API Documentation

In-depth reference documentation for iQmetrix API's.

NAV

OVERVIEW

The Order service is a centralized location for interacting with orders and their items. Each order is assigned an OrderType and OrderStatus, as are the items in the order. For example, an order could have an InStock item that has been Processed.

The state flow illustrated below shows the process from creating an order to its completion. An order can only be cancelled when in the Pending state, and cannot be cancelled otherwise.

BASE URLS

Demo: https://orderdemo.iqmetrix.net/v1
Production: https://order.iqmetrix.net/v1

RESOURCES

Order

The Order resource captures information about orders.

{
    "Id": "bf85cefe-b308-45b0-b938-5bc1dda9be98",
    "OrderTypeId": 1,
    "OrderType": "Sales",
    "State": "Created",
    "PrintableId": "68LN104",
    "Name": "iPhone 6 Order",
    "TenderId": "INV112",
    "TenderOrigin": "135-93",
    "SourceId": null,
    "SourceName": null,
    "OrderReference": "S4o-Sn4",
    "EntityId": 14192,
    "ShippingEntityId": 0,
    "CustomerId": "0581d755-0b52-4a0d-83a8-c066255eca76",
    "BillingCustomerId": "061ab1a7-d703-4fc9-ad28-ebf0ed11a711",
    "ShippingCustomerId": "061ab1a7-d703-4fc9-ad28-ebf0ed11a711",
    "ShippingAddressId": "0881586d-9926-48c3-aa16-79931d69f9dd",
    "BillingAddressId": "0881586d-9926-48c3-aa16-79931d69f9dd",
    "EmployeeId": 123,
    "DiscountCode": "MTRY-15",
    "DiscountDescription": "Military Discount",
    "DiscountAmount": 15,
    "CreatedDateUtc": "2018-04-27T22:57:57.353",
    "OrderExpiryHours": 72,
    "OrderExpiryDate": "2018-04-30T22:57:57.353"
}
Name Description
Id (GUID) The identifier of the order. The system generates this identifier when the sales order is created and returns it in the response to the POST request.
OrderTypeId (Integer) The code specifying the order type. For a list of supported order types, see OrderType.
OrderType (String) Read-only. A string representing the item type specified in OrderTypeId.
State (String) The state of the order. This value is initially generated and is also generated at different points in the order’s lifecycle. Some states can be (and should be) modified using the API; for this information, and for a list of legal state changes, see Overview. For a list of supported states, see OrderState.
PrintableId (String) An identifier for this order that can used to print on invoices or to search for. This value is system-generated and read-only.
Name (String) A descriptive name for the order. You can use this field to identify or differentiate one order from another.
TenderId (String) The tender identifier from the tendering system. This can be, for example, an invoice number from the system that created the order, or an invoice number from RQ.
TenderOrigin (String) The tender origin from the tendering system.
SourceId (String) The order identifier from the source service creating the order.
SourceName (String) The name of the source service creating this order.
OrderReference (String) A generic field you can use to store information relevant to this order. Maximum 500 characters.
EntityId (Integer) The identifier of this Location.
ShippingEntityId (Integer) Forbidden if ShippingCustomerId is provided. Identifier for the Location, for example, a physical store, where this order will be shipped.
CustomerId (GUID) The identifier of both the billing and shipping customer. This field is used when only one CustomerId is submitted.
BillingCustomerId (GUID) The identifier of the Customer to be billed for the order.
BillingAddressId (GUID) The identifier of the Address of the billing customer.
ShippingCustomerId (GUID) The identifier of the Customer to whom the order should be shipped. If this value is provided, ShippingEntityId must be omitted.
ShippingAddressId (GUID) The identifier of the Address where the order should be shipped.
EmployeeId (Integer) The identifier of the employee associated with this order.
DiscountCode (String) The code for the discount being applied to this order.
DiscountDescription (String) A description of the discount being applied to this order.
DiscountAmount (Decimal) The value of the discount being applied to this order.
CreatedDateUtc (DateTime) The date and time the order was created, in UTC.
OrderExpiryHours (Integer) The number of hours before this order expires. After expiry, the order can no longer be updated. The default is 72.
OrderExpiryDate (DateTime) The date and time this order expires. After expiry, the order can no longer be updated.

Item

The Item resource captures information about the items in an order.

Note that ListPrice does not change with Quantity. ListPrice is always the price for a single item. For example, to order two instances of the same product, where the product list price is $50.00, ListPrice is 50 (not 2 x 50 = 100) and Quantity is 2.

{
    "Id": "cd985aac-7447-4e0d-833a-2dee6b367783",
    "OrderId": "bf85cefe-b308-45b0-b938-5bc1dda9be98",
    "ItemTypeId": 1,
    "ItemType": "DropShip",
    "ItemStatusId": 1,
    "ItemStatus": "New",
    "ProductId": "12312",
    "SupplierEntityId": 0,
    "Quantity": 5,
    "Cost": 100,
    "ListPrice": 25,
    "SellingPrice": 9.99,
    "Index": 0,
    "Description": "iPhone Adapter",
    "SKU": "0005",
    "Notes": "",
    "SerialNumbers": [
        "23445",
        "1234"
    ],
    "SupplierReference": "10",
    "TrackingInformation": [
        {
            "Quantity": 1,
            "TrackingNumber": "1TTTTN4421"
        }
    ],
    "ShippingOptionId": "1",
    "DeliveryRemarks": "Require signature",
    "DeliveryDate": "2018-01-04T16:00:00"
    
}
Name Description
Id (GUID) The identifier of the item.
OrderId (GUID) The identifier of the Order associated with this item. This identifier is also present in the URI of the request.
ItemTypeId (String) The code specifying the item type. For a list of supported item types, see ItemType.
ItemType (String) Read-only. A string representing the item type specified in ItemTypeId.
ItemStatusId (Integer) The code representing the item status. For a list of supported item status values, see ItemStatus.
ItemStatus (String) Read-only. A string representing the item type specified in ItemStatusId.
ProductId (String) The retailer’s catalog product identifier for this item.
SupplierEntityId (Integer) The identifier of the supplier of this item.
Quantity (Integer) The number of this item being ordered. The default is 0.
Cost (Decimal) The cost to the retailer for the product. The default is 0.
ListPrice (Decimal) The list price for the item. The default is 0.
SellingPrice (Decimal) The price at which the item was actually sold. The default is 0.
Index (Integer) The sort order for the items in the order.
Description (String) The description of this item.
SKU (String) The product SKU for this item.
Notes (String) A generic field for recording notes about the item.
SerialNumbers (Array[string]) The serial number(s) associated with this item.
SupplierReference (String) A reference number identifying the supplier. Can be used for additional Supplier reference information.
TrackingInformation (Array[object]) Tracking information for the item. Objects in the array are in the form of key-value pairs.
TrackingInformation.Quantity (Integer) The number of items being tracked.
TrackingInformation.TrackingNumber (String) The tracking number.
ShippingOptionId (String) The identifier for the shipping option this item will use.
DeliveryRemarks (String) A field you can use to capture information about delivery.
DeliveryDate (DateTime) The date the item is to be delivered, in UTC.

OrderFull

The OrderFull resource is a composition of an Order resource together with all Item resources that have been added to the order.

Note that the OrderFull resource simply aggregates information associated with a given order. The identifier of the order does not change between the Order and OrderFull records for an order; that is, the order identifier in the Order resource and in the OrderFull resource is the same in both cases.

The OrderFull resource can only be updated when it has a status value of Pending or Created.

{
   "Id": "cd985aac-7447-4e0d-833a-2dee6b367783",
    "OrderId": "bf85cefe-b308-45b0-b938-5bc1dda9be98",
    "ItemTypeId": 1,
    "ItemType": "DropShip",
    "ItemStatusId": 1,
    "ItemStatus": "New",
    "ProductId": "12312",
    "SupplierEntityId": 14653,
    "Quantity": 5,
    "Cost": 100,
    "ListPrice": 25,
    "SellingPrice": 9.99,
    "Index": 0,
    "Description": "iPhone Adapter",
    "SKU": "0005",
    "Notes": "",
    "SerialNumbers": [
        "23445",
        "1234"
    ],
    "SupplierReference": "10",
    "TrackingInformation": [
        {
            "Quantity": 1,
            "TrackingNumber": "1TTTTN4421"
        }
    ],
    "ShippingOptionId": "1",
    "DeliveryRemarks": "Require signature",
    "DeliveryDate": "2018-01-04T16:00:00",
    "Items": [
    {
        "Id": "cd985aac-7447-4e0d-833a-2dee6b367783",
        "OrderId": "bf85cefe-b308-45b0-b938-5bc1dda9be98",
        "ItemTypeId": 1,
        "ItemType": "DropShip",
        "ItemStatusId": 1,
        "ItemStatus": "New",
        "ProductId": "12312",
        "SupplierEntityId": 14653,
        "Quantity": 5,
        "Cost": 100,
        "ListPrice": 25,
        "SellingPrice": 9.99,
        "Index": 0,
        "Description": "iPhone Adapter",
        "SKU": "0005",
        "Notes": "",
        "SerialNumbers": [
            "23445",
            "1234"
        ],
        "SupplierReference": "1fe",
        "TrackingInformation": [],
        "ShippingOptionId": null,
        "DeliveryRemarks": null,
        "DeliveryDate": null
    }
]


}

For a description of Order properties, see Order. For a description of Item properties, see Item.

ENUMERATIONS

ItemStatus

OrderType ItemType Id
Dropship New 1
Dropship Cancelled 2
Dropship Processed 3
Dropship Ordered 4
Dropship Error 5
Dropship NotAvailable 6
Dropship Shipped 7
Dropship Received 8
eCommerce New 13
eCommerce Processed 14
eCommerce Cancelled 17
InStock New 9
InStock Processed 10
InStock Error 11
InStock BackOrder 12
InStock Cancelled 16
Shipping Shipping 15

ItemType

Id Item Type Description
1 DropShip Item is available to be shipped
2 InStock Item is in stock
3 eCommerce Item is from an eCommerce platform
4 Shipping Item is shipping

OrderState

Id Name
0 Created
1 Pending
2 Processed
3 Cancelled
4 Completed

OrderType

Id Name Description
3 Purchase An Order placed to a Supplier or Vendor
4 RMA Return Merchandise Authorization, an Order for returns, repairs or replacements
1 Sales An Order placed by a Customer
2 Transfer An Order to relocate inventory

REQUESTS

POST an Order

The EntityId used in the request parameters must belong to the CompanyId used in the URI.

Request

POST /Companies({CompanyId})/Orders

Example Request

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

{
    "Name": "iPhone 5 Order",
    "BillingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "BillingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "DiscountAmount": 15,
    "DiscountCode": "MTRY-15",
    "DiscountDescription": "Military discount",
    "EmployeeId": 15,
    "EntityId": 14202,
    "OrderExpiryHours": 20,
    "OrderTypeId": 3,
    "ShippingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "ShippingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ShippingEntityId": 14202,
    "State": "Created",
    "TenderId": "TT101IN18"
}
curl -X POST "https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json" -H "Content-Type: application/json" -d '{
    "Name": "iPhone 5 Order",
    "BillingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "BillingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "DiscountAmount": 15,
    "DiscountCode": "MTRY-15",
    "DiscountDescription": "Military discount",
    "EmployeeId": 15,
    "EntityId": 14202,
    "OrderExpiryHours": 20,
    "OrderTypeId": 3,
    "ShippingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "ShippingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ShippingEntityId": 14202,
    "State": "Created",
    "TenderId": "TT101IN18"
}'
static IRestResponse CreatingAnOrder()
{
    var client = new RestClient("https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders");
    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", "{\"Name\":\"iPhone 5 Order\",\"BillingAddressId\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"BillingCustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"DiscountAmount\":15,\"DiscountCode\":\"MTRY-15\",\"DiscountDescription\":\"Military discount\",\"EmployeeId\":15,\"EntityId\":14202,\"OrderExpiryHours\":20,\"OrderTypeId\":3,\"ShippingAddressId\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"ShippingCustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ShippingEntityId\":14202,\"State\":\"Created\",\"TenderId\":\"TT101IN18\"}", 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 CreatingAnOrder() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpPost request = new HttpPost("https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    request.addHeader("Content-Type", "application/json"); 
    StringEntity body = new StringEntity("{\"Name\":\"iPhone 5 Order\",\"BillingAddressId\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"BillingCustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"DiscountAmount\":15,\"DiscountCode\":\"MTRY-15\",\"DiscountDescription\":\"Military discount\",\"EmployeeId\":15,\"EntityId\":14202,\"OrderExpiryHours\":20,\"OrderTypeId\":3,\"ShippingAddressId\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"ShippingCustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ShippingEntityId\":14202,\"State\":\"Created\",\"TenderId\":\"TT101IN18\"}");
    request.setEntity(body);
    
    return httpClient.execute(request);
}
require 'rest-client'

body = "{\"Name\":\"iPhone 5 Order\",\"BillingAddressId\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"BillingCustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"DiscountAmount\":15,\"DiscountCode\":\"MTRY-15\",\"DiscountDescription\":\"Military discount\",\"EmployeeId\":15,\"EntityId\":14202,\"OrderExpiryHours\":20,\"OrderTypeId\":3,\"ShippingAddressId\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"ShippingCustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ShippingEntityId\":14202,\"State\":\"Created\",\"TenderId\":\"TT101IN18\"}";

response = RestClient.post 'https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders', 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": "cdd26b8f-4ed1-409d-9984-982e081c425e",
    "Name": "iPhone 5 Order",
    "BillingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "BillingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "CreatedDateUtc": "2015-03-27T18:47:29.9012402+00:00",
    "DiscountAmount": 15,
    "DiscountCode": "MTRY-15",
    "DiscountDescription": "Military discount",
    "EmployeeId": 15,
    "EntityId": 14202,
    "OrderExpiryDate": "2015-05-05T14:32:05.9140188+00:00",
    "OrderExpiryHours": 20,
    "OrderType": "Sales",
    "OrderTypeId": 3,
    "PrintableId": "8765-1234-987",
    "ShippingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "ShippingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ShippingEntityId": 14202,
    "State": "Created",
    "TenderId": "TT101IN18"
}

Order

GET All Order Summaries for a Company

Request

GET /Companies({CompanyId})/Orders

Example Request

GET /Companies(14146)/Orders
Authorization: Bearer (Access Token)
Accept: application/json

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



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

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
[
    {
        "Id": "cdd26b8f-4ed1-409d-9984-982e081c425e",
        "Name": "iPhone 5 Order",
        "BillingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
        "BillingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
        "CreatedDateUtc": "2015-03-27T18:47:29.9012402+00:00",
        "DiscountAmount": 15,
        "DiscountCode": "MTRY-15",
        "DiscountDescription": "Military discount",
        "EmployeeId": 15,
        "EntityId": 14202,
        "OrderExpiryDate": "2015-05-05T14:32:05.9140188+00:00",
        "OrderExpiryHours": 20,
        "OrderType": "Sales",
        "OrderTypeId": 3,
        "PrintableId": "8765-1234-987",
        "ShippingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
        "ShippingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
        "ShippingEntityId": 14202,
        "State": "Created",
        "TenderId": "TT101IN18"
    }
]

Array[Order]

POST an Item to an Order

Request

POST /Companies({CompanyId})/Orders({OrderId})/Items

Example Request

POST /Companies(14146)/Orders(2ad88692-7757-4a72-915b-dfe8f2539279)/Items
Authorization: Bearer (Access Token)
Accept: application/json
Content-Type: application/json

{
    "Cost": 5.99,
    "Description": "Samsung Galaxy S4 Standard Battery",
    "ItemStatusId": 1,
    "ItemTypeId": "1",
    "Index": 0,
    "ListPrice": 12.99,
    "Notes": "Dented corner",
    "ProductId": "a183f1a9-c58f-426a-930a-9a6357db52ed",
    "Quantity": 2,
    "SellingPrice": 9.99,
    "SerialNumbers": [
        "abc321"
    ],
    "SKU": "00001",
    "ShippingOptionId": "1",
    "SupplierEntityId": 14107,
    "SupplierReference": "10",
    "TrackingInformation": [
        {
            "Quantity": 1,
            "TrackingNumber": "1TTTTN4421"
        }
    ]
}
curl -X POST "https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders(2ad88692-7757-4a72-915b-dfe8f2539279)/Items" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json" -H "Content-Type: application/json" -d '{
    "Cost": 5.99,
    "Description": "Samsung Galaxy S4 Standard Battery",
    "ItemStatusId": 1,
    "ItemTypeId": "1",
    "Index": 0,
    "ListPrice": 12.99,
    "Notes": "Dented corner",
    "ProductId": "a183f1a9-c58f-426a-930a-9a6357db52ed",
    "Quantity": 2,
    "SellingPrice": 9.99,
    "SerialNumbers": [
        "abc321"
    ],
    "SKU": "00001",
    "ShippingOptionId": "1",
    "SupplierEntityId": 14107,
    "SupplierReference": "10",
    "TrackingInformation": [
        {
            "Quantity": 1,
            "TrackingNumber": "1TTTTN4421"
        }
    ]
}'
static IRestResponse AddingAnItemToAnOrder()
{
    var client = new RestClient("https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders(2ad88692-7757-4a72-915b-dfe8f2539279)/Items");
    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", "{\"Cost\":5.99,\"Description\":\"Samsung Galaxy S4 Standard Battery\",\"ItemStatusId\":1,\"ItemTypeId\":\"1\",\"Index\":0,\"ListPrice\":12.99,\"Notes\":\"Dented corner\",\"ProductId\":\"a183f1a9-c58f-426a-930a-9a6357db52ed\",\"Quantity\":2,\"SellingPrice\":9.99,\"SerialNumbers\":[\"abc321\"],\"SKU\":\"00001\",\"ShippingOptionId\":\"1\",\"SupplierEntityId\":14107,\"SupplierReference\":\"10\",\"TrackingInformation\":[{\"Quantity\":1,\"TrackingNumber\":\"1TTTTN4421\"}]}", 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 AddingAnItemToAnOrder() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpPost request = new HttpPost("https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders(2ad88692-7757-4a72-915b-dfe8f2539279)/Items");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    request.addHeader("Content-Type", "application/json"); 
    StringEntity body = new StringEntity("{\"Cost\":5.99,\"Description\":\"Samsung Galaxy S4 Standard Battery\",\"ItemStatusId\":1,\"ItemTypeId\":\"1\",\"Index\":0,\"ListPrice\":12.99,\"Notes\":\"Dented corner\",\"ProductId\":\"a183f1a9-c58f-426a-930a-9a6357db52ed\",\"Quantity\":2,\"SellingPrice\":9.99,\"SerialNumbers\":[\"abc321\"],\"SKU\":\"00001\",\"ShippingOptionId\":\"1\",\"SupplierEntityId\":14107,\"SupplierReference\":\"10\",\"TrackingInformation\":[{\"Quantity\":1,\"TrackingNumber\":\"1TTTTN4421\"}]}");
    request.setEntity(body);
    
    return httpClient.execute(request);
}
require 'rest-client'

body = "{\"Cost\":5.99,\"Description\":\"Samsung Galaxy S4 Standard Battery\",\"ItemStatusId\":1,\"ItemTypeId\":\"1\",\"Index\":0,\"ListPrice\":12.99,\"Notes\":\"Dented corner\",\"ProductId\":\"a183f1a9-c58f-426a-930a-9a6357db52ed\",\"Quantity\":2,\"SellingPrice\":9.99,\"SerialNumbers\":[\"abc321\"],\"SKU\":\"00001\",\"ShippingOptionId\":\"1\",\"SupplierEntityId\":14107,\"SupplierReference\":\"10\",\"TrackingInformation\":[{\"Quantity\":1,\"TrackingNumber\":\"1TTTTN4421\"}]}";

response = RestClient.post 'https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders(2ad88692-7757-4a72-915b-dfe8f2539279)/Items', 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": "8592718e-bcca-468c-8009-38678929b693",
    "Cost": 5.99,
    "Description": "Samsung Galaxy S4 Standard Battery",
    "ItemStatus": "New",
    "ItemStatusId": 1,
    "ItemType": "DropShip",
    "ItemTypeId": "1",
    "Index": 0,
    "ListPrice": 12.99,
    "Notes": "Dented corner",
    "OrderId": "cdd26b8f-4ed1-409d-9984-982e081c425e",
    "ProductId": "a183f1a9-c58f-426a-930a-9a6357db52ed",
    "Quantity": 2,
    "SellingPrice": 9.99,
    "SerialNumbers": [
        "abc321"
    ],
    "SKU": "00001",
    "ShippingOptionId": "1",
    "SupplierEntityId": 14107,
    "SupplierReference": "10",
    "TrackingInformation": [
        {
            "Quantity": 1,
            "TrackingNumber": "1TTTTN4421"
        }
    ]
}

Item

GET all Items on an Order

Request

GET /Companies({CompanyId})/Orders({OrderId})/Items

Example Request

GET /Companies(14146)/Orders(2ad88692-7757-4a72-915b-dfe8f2539279)/Items
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders(2ad88692-7757-4a72-915b-dfe8f2539279)/Items" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingAllItemsOnAnOrder()
{
    var client = new RestClient("https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders(2ad88692-7757-4a72-915b-dfe8f2539279)/Items");
    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 GettingAllItemsOnAnOrder() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders(2ad88692-7757-4a72-915b-dfe8f2539279)/Items");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders(2ad88692-7757-4a72-915b-dfe8f2539279)/Items', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
[
    {
        "Id": "8592718e-bcca-468c-8009-38678929b693",
        "Cost": 5.99,
        "Description": "Samsung Galaxy S4 Standard Battery",
        "ItemStatus": "New",
        "ItemStatusId": 1,
        "ItemType": "DropShip",
        "ItemTypeId": "1",
        "Index": 0,
        "ListPrice": 12.99,
        "Notes": "Dented corner",
        "OrderId": "cdd26b8f-4ed1-409d-9984-982e081c425e",
        "ProductId": "a183f1a9-c58f-426a-930a-9a6357db52ed",
        "Quantity": 2,
        "SellingPrice": 9.99,
        "SerialNumbers": [
            "abc321"
        ],
        "SKU": "00001",
        "ShippingOptionId": "1",
        "SupplierEntityId": 14107,
        "SupplierReference": "10",
        "TrackingInformation": [
            {
                "Quantity": 1,
                "TrackingNumber": "1TTTTN4421"
            }
        ]
    }
]

Array[Item]

GET an Order

Request

GET /Companies({CompanyId})/Orders({OrderId})

Example Request

GET /Companies(14146)/Orders(2ad88692-7757-4a72-915b-dfe8f2539279)
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders(2ad88692-7757-4a72-915b-dfe8f2539279)" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingAnOrder()
{
    var client = new RestClient("https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders(2ad88692-7757-4a72-915b-dfe8f2539279)");
    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 GettingAnOrder() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders(2ad88692-7757-4a72-915b-dfe8f2539279)");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders(2ad88692-7757-4a72-915b-dfe8f2539279)', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
{
    "Id": "cdd26b8f-4ed1-409d-9984-982e081c425e",
    "Name": "iPhone 5 Order",
    "BillingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "BillingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "CreatedDateUtc": "2015-03-27T18:47:29.9012402+00:00",
    "DiscountAmount": 15,
    "DiscountCode": "MTRY-15",
    "DiscountDescription": "Military discount",
    "EmployeeId": 15,
    "EntityId": 14202,
    "OrderExpiryDate": "2015-05-05T14:32:05.9140188+00:00",
    "OrderExpiryHours": 20,
    "OrderType": "Sales",
    "OrderTypeId": 3,
    "PrintableId": "8765-1234-987",
    "ShippingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "ShippingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ShippingEntityId": 14202,
    "State": "Created",
    "TenderId": "TT101IN18"
}

Order

PUT an Order

Note Once an Order is in the Processed state, it can no longer be updated.

Request

PUT /Companies({CompanyId})/Orders({OrderId})

Example Request

PUT /Companies(14146)/Orders(2ad88692-7757-4a72-915b-dfe8f2539279)
Authorization: Bearer (Access Token)
Accept: application/json
Content-Type: application/json

{
    "Id": "cdd26b8f-4ed1-409d-9984-982e081c425e",
    "Name": "iPhone 5 Order",
    "BillingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "BillingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "CreatedDateUtc": "2015-03-27T18:47:29.9012402+00:00",
    "DiscountAmount": 15,
    "DiscountCode": "MTRY-15",
    "DiscountDescription": "Military discount",
    "EmployeeId": 15,
    "EntityId": 14202,
    "OrderExpiryDate": "2015-05-05T14:32:05.9140188+00:00",
    "OrderExpiryHours": 20,
    "OrderType": "Sales",
    "OrderTypeId": 3,
    "PrintableId": "8765-1234-987",
    "ShippingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "ShippingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ShippingEntityId": 14202,
    "State": "Created",
    "TenderId": "TT101IN18"
}
curl -X PUT "https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders(2ad88692-7757-4a72-915b-dfe8f2539279)" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json" -H "Content-Type: application/json" -d '{
    "Id": "cdd26b8f-4ed1-409d-9984-982e081c425e",
    "Name": "iPhone 5 Order",
    "BillingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "BillingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "CreatedDateUtc": "2015-03-27T18:47:29.9012402+00:00",
    "DiscountAmount": 15,
    "DiscountCode": "MTRY-15",
    "DiscountDescription": "Military discount",
    "EmployeeId": 15,
    "EntityId": 14202,
    "OrderExpiryDate": "2015-05-05T14:32:05.9140188+00:00",
    "OrderExpiryHours": 20,
    "OrderType": "Sales",
    "OrderTypeId": 3,
    "PrintableId": "8765-1234-987",
    "ShippingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "ShippingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ShippingEntityId": 14202,
    "State": "Created",
    "TenderId": "TT101IN18"
}'
static IRestResponse UpdatingAnOrder()
{
    var client = new RestClient("https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders(2ad88692-7757-4a72-915b-dfe8f2539279)");
    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\":\"cdd26b8f-4ed1-409d-9984-982e081c425e\",\"Name\":\"iPhone 5 Order\",\"BillingAddressId\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"BillingCustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"CreatedDateUtc\":\"2015-03-27T18:47:29.9012402+00:00\",\"DiscountAmount\":15,\"DiscountCode\":\"MTRY-15\",\"DiscountDescription\":\"Military discount\",\"EmployeeId\":15,\"EntityId\":14202,\"OrderExpiryDate\":\"2015-05-05T14:32:05.9140188+00:00\",\"OrderExpiryHours\":20,\"OrderType\":\"Sales\",\"OrderTypeId\":3,\"PrintableId\":\"8765-1234-987\",\"ShippingAddressId\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"ShippingCustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ShippingEntityId\":14202,\"State\":\"Created\",\"TenderId\":\"TT101IN18\"}", 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 UpdatingAnOrder() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpPut request = new HttpPut("https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders(2ad88692-7757-4a72-915b-dfe8f2539279)");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    request.addHeader("Content-Type", "application/json"); 
    StringEntity body = new StringEntity("{\"Id\":\"cdd26b8f-4ed1-409d-9984-982e081c425e\",\"Name\":\"iPhone 5 Order\",\"BillingAddressId\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"BillingCustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"CreatedDateUtc\":\"2015-03-27T18:47:29.9012402+00:00\",\"DiscountAmount\":15,\"DiscountCode\":\"MTRY-15\",\"DiscountDescription\":\"Military discount\",\"EmployeeId\":15,\"EntityId\":14202,\"OrderExpiryDate\":\"2015-05-05T14:32:05.9140188+00:00\",\"OrderExpiryHours\":20,\"OrderType\":\"Sales\",\"OrderTypeId\":3,\"PrintableId\":\"8765-1234-987\",\"ShippingAddressId\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"ShippingCustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ShippingEntityId\":14202,\"State\":\"Created\",\"TenderId\":\"TT101IN18\"}");
    request.setEntity(body);
    
    return httpClient.execute(request);
}
require 'rest-client'

body = "{\"Id\":\"cdd26b8f-4ed1-409d-9984-982e081c425e\",\"Name\":\"iPhone 5 Order\",\"BillingAddressId\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"BillingCustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"CreatedDateUtc\":\"2015-03-27T18:47:29.9012402+00:00\",\"DiscountAmount\":15,\"DiscountCode\":\"MTRY-15\",\"DiscountDescription\":\"Military discount\",\"EmployeeId\":15,\"EntityId\":14202,\"OrderExpiryDate\":\"2015-05-05T14:32:05.9140188+00:00\",\"OrderExpiryHours\":20,\"OrderType\":\"Sales\",\"OrderTypeId\":3,\"PrintableId\":\"8765-1234-987\",\"ShippingAddressId\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"ShippingCustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ShippingEntityId\":14202,\"State\":\"Created\",\"TenderId\":\"TT101IN18\"}";

response = RestClient.put 'https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders(2ad88692-7757-4a72-915b-dfe8f2539279)', 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": "cdd26b8f-4ed1-409d-9984-982e081c425e",
    "Name": "iPhone 5 Order",
    "BillingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "BillingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "CreatedDateUtc": "2015-03-27T18:47:29.9012402+00:00",
    "DiscountAmount": 15,
    "DiscountCode": "MTRY-15",
    "DiscountDescription": "Military discount",
    "EmployeeId": 15,
    "EntityId": 14202,
    "OrderExpiryDate": "2015-05-05T14:32:05.9140188+00:00",
    "OrderExpiryHours": 20,
    "OrderType": "Sales",
    "OrderTypeId": 3,
    "PrintableId": "8765-1234-987",
    "ShippingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "ShippingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ShippingEntityId": 14202,
    "State": "Created",
    "TenderId": "TT101IN18"
}

Order

Processing an Order

Request

POST /Companies({CompanyId})/Orders({OrderId})/Process

Example Request

POST /Companies(14146)/Orders(2ad88692-7757-4a72-915b-dfe8f2539279)/Process
Authorization: Bearer (Access Token)
Accept: application/json
Content-Type: application/json

{
    "OrderId": "cdd26b8f-4ed1-409d-9984-982e081c425e"
}
curl -X POST "https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders(2ad88692-7757-4a72-915b-dfe8f2539279)/Process" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json" -H "Content-Type: application/json" -d '{
    "OrderId": "cdd26b8f-4ed1-409d-9984-982e081c425e"
}'
static IRestResponse ProcessingAnOrder()
{
    var client = new RestClient("https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders(2ad88692-7757-4a72-915b-dfe8f2539279)/Process");
    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", "{\"OrderId\":\"cdd26b8f-4ed1-409d-9984-982e081c425e\"}", 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 ProcessingAnOrder() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpPost request = new HttpPost("https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders(2ad88692-7757-4a72-915b-dfe8f2539279)/Process");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    request.addHeader("Content-Type", "application/json"); 
    StringEntity body = new StringEntity("{\"OrderId\":\"cdd26b8f-4ed1-409d-9984-982e081c425e\"}");
    request.setEntity(body);
    
    return httpClient.execute(request);
}
require 'rest-client'

body = "{\"OrderId\":\"cdd26b8f-4ed1-409d-9984-982e081c425e\"}";

response = RestClient.post 'https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders(2ad88692-7757-4a72-915b-dfe8f2539279)/Process', 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": 1,
    "OrderId": "cdd26b8f-4ed1-409d-9984-982e081c425e"
}                        

POST an Order with Items

Instead of creating an Order and then adding Items to the Order one at a time, this request can be used to create an Order with Items all at once.

Request

POST /Companies({CompanyId})/OrderFull

Example Request

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

{
    "Name": "iPhone 5 Order",
    "BillingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "BillingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "DiscountAmount": 15,
    "DiscountCode": "MTRY-15",
    "DiscountDescription": "Military discount",
    "EmployeeId": 15,
    "EntityId": 14202,
    "OrderExpiryHours": 20,
    "OrderTypeId": 3,
    "ShippingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "ShippingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ShippingEntityId": 14202,
    "State": "Created",
    "TenderId": "INV112",
    "Items": [
        {
            "Cost": 5.99,
            "Description": "Samsung Galaxy S4 Standard Battery",
            "ItemStatusId": 1,
            "ItemTypeId": "1",
            "Index": 0,
            "ListPrice": 12.99,
            "Notes": "Dented corner",
            "ProductId": "a183f1a9-c58f-426a-930a-9a6357db52ed",
            "Quantity": 2,
            "SellingPrice": 9.99,
            "SerialNumbers": [
                "abc321"
            ],
            "SKU": "00001",
            "ShippingOptionId": "1",
            "SupplierEntityId": 14107,
            "SupplierReference": "10",
            "TrackingInformation": [
                {
                    "Quantity": 1,
                    "TrackingNumber": "1TTTTN4421"
                }
            ]
        }
    ]
}
curl -X POST "https://orderdemo.iqmetrix.net/v1/Companies(14146)/OrderFull" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json" -H "Content-Type: application/json" -d '{
    "Name": "iPhone 5 Order",
    "BillingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "BillingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "DiscountAmount": 15,
    "DiscountCode": "MTRY-15",
    "DiscountDescription": "Military discount",
    "EmployeeId": 15,
    "EntityId": 14202,
    "OrderExpiryHours": 20,
    "OrderTypeId": 3,
    "ShippingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "ShippingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ShippingEntityId": 14202,
    "State": "Created",
    "TenderId": "INV112",
    "Items": [
        {
            "Cost": 5.99,
            "Description": "Samsung Galaxy S4 Standard Battery",
            "ItemStatusId": 1,
            "ItemTypeId": "1",
            "Index": 0,
            "ListPrice": 12.99,
            "Notes": "Dented corner",
            "ProductId": "a183f1a9-c58f-426a-930a-9a6357db52ed",
            "Quantity": 2,
            "SellingPrice": 9.99,
            "SerialNumbers": [
                "abc321"
            ],
            "SKU": "00001",
            "ShippingOptionId": "1",
            "SupplierEntityId": 14107,
            "SupplierReference": "10",
            "TrackingInformation": [
                {
                    "Quantity": 1,
                    "TrackingNumber": "1TTTTN4421"
                }
            ]
        }
    ]
}'
static IRestResponse CreatingAnOrderWithItems()
{
    var client = new RestClient("https://orderdemo.iqmetrix.net/v1/Companies(14146)/OrderFull");
    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", "{\"Name\":\"iPhone 5 Order\",\"BillingAddressId\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"BillingCustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"DiscountAmount\":15,\"DiscountCode\":\"MTRY-15\",\"DiscountDescription\":\"Military discount\",\"EmployeeId\":15,\"EntityId\":14202,\"OrderExpiryHours\":20,\"OrderTypeId\":3,\"ShippingAddressId\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"ShippingCustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ShippingEntityId\":14202,\"State\":\"Created\",\"TenderId\":\"INV112\",\"Items\":[{\"Cost\":5.99,\"Description\":\"Samsung Galaxy S4 Standard Battery\",\"ItemStatusId\":1,\"ItemTypeId\":\"1\",\"Index\":0,\"ListPrice\":12.99,\"Notes\":\"Dented corner\",\"ProductId\":\"a183f1a9-c58f-426a-930a-9a6357db52ed\",\"Quantity\":2,\"SellingPrice\":9.99,\"SerialNumbers\":[\"abc321\"],\"SKU\":\"00001\",\"ShippingOptionId\":\"1\",\"SupplierEntityId\":14107,\"SupplierReference\":\"10\",\"TrackingInformation\":[{\"Quantity\":1,\"TrackingNumber\":\"1TTTTN4421\"}]}]}", 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 CreatingAnOrderWithItems() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpPost request = new HttpPost("https://orderdemo.iqmetrix.net/v1/Companies(14146)/OrderFull");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    request.addHeader("Content-Type", "application/json"); 
    StringEntity body = new StringEntity("{\"Name\":\"iPhone 5 Order\",\"BillingAddressId\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"BillingCustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"DiscountAmount\":15,\"DiscountCode\":\"MTRY-15\",\"DiscountDescription\":\"Military discount\",\"EmployeeId\":15,\"EntityId\":14202,\"OrderExpiryHours\":20,\"OrderTypeId\":3,\"ShippingAddressId\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"ShippingCustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ShippingEntityId\":14202,\"State\":\"Created\",\"TenderId\":\"INV112\",\"Items\":[{\"Cost\":5.99,\"Description\":\"Samsung Galaxy S4 Standard Battery\",\"ItemStatusId\":1,\"ItemTypeId\":\"1\",\"Index\":0,\"ListPrice\":12.99,\"Notes\":\"Dented corner\",\"ProductId\":\"a183f1a9-c58f-426a-930a-9a6357db52ed\",\"Quantity\":2,\"SellingPrice\":9.99,\"SerialNumbers\":[\"abc321\"],\"SKU\":\"00001\",\"ShippingOptionId\":\"1\",\"SupplierEntityId\":14107,\"SupplierReference\":\"10\",\"TrackingInformation\":[{\"Quantity\":1,\"TrackingNumber\":\"1TTTTN4421\"}]}]}");
    request.setEntity(body);
    
    return httpClient.execute(request);
}
require 'rest-client'

body = "{\"Name\":\"iPhone 5 Order\",\"BillingAddressId\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"BillingCustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"DiscountAmount\":15,\"DiscountCode\":\"MTRY-15\",\"DiscountDescription\":\"Military discount\",\"EmployeeId\":15,\"EntityId\":14202,\"OrderExpiryHours\":20,\"OrderTypeId\":3,\"ShippingAddressId\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"ShippingCustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ShippingEntityId\":14202,\"State\":\"Created\",\"TenderId\":\"INV112\",\"Items\":[{\"Cost\":5.99,\"Description\":\"Samsung Galaxy S4 Standard Battery\",\"ItemStatusId\":1,\"ItemTypeId\":\"1\",\"Index\":0,\"ListPrice\":12.99,\"Notes\":\"Dented corner\",\"ProductId\":\"a183f1a9-c58f-426a-930a-9a6357db52ed\",\"Quantity\":2,\"SellingPrice\":9.99,\"SerialNumbers\":[\"abc321\"],\"SKU\":\"00001\",\"ShippingOptionId\":\"1\",\"SupplierEntityId\":14107,\"SupplierReference\":\"10\",\"TrackingInformation\":[{\"Quantity\":1,\"TrackingNumber\":\"1TTTTN4421\"}]}]}";

response = RestClient.post 'https://orderdemo.iqmetrix.net/v1/Companies(14146)/OrderFull', 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": "cdd26b8f-4ed1-409d-9984-982e081c425e",
    "Name": "iPhone 5 Order",
    "BillingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "BillingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "CreatedDateUtc": "2015-03-27T18:47:29.9012402+00:00",
    "DiscountAmount": 15,
    "DiscountCode": "MTRY-15",
    "DiscountDescription": "Military discount",
    "EmployeeId": 15,
    "EntityId": 14202,
    "OrderExpiryDate": "2015-05-05T14:32:05.9140188+00:00",
    "OrderExpiryHours": 20,
    "OrderType": "Sales",
    "OrderTypeId": 3,
    "PrintableId": "8765-1234-987",
    "ShippingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "ShippingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ShippingEntityId": 14202,
    "State": "Created",
    "TenderId": "INV112",
    "Items": [
        {
            "Id": "8592718e-bcca-468c-8009-38678929b693",
            "Cost": 5.99,
            "Description": "Samsung Galaxy S4 Standard Battery",
            "ItemStatus": "New",
            "ItemStatusId": 1,
            "ItemType": "DropShip",
            "ItemTypeId": "1",
            "Index": 0,
            "ListPrice": 12.99,
            "Notes": "Dented corner",
            "OrderId": "cdd26b8f-4ed1-409d-9984-982e081c425e",
            "ProductId": "a183f1a9-c58f-426a-930a-9a6357db52ed",
            "Quantity": 2,
            "SellingPrice": 9.99,
            "SerialNumbers": [
                "abc321"
            ],
            "SKU": "00001",
            "ShippingOptionId": "1",
            "SupplierEntityId": 14107,
            "SupplierReference": "10",
            "TrackingInformation": [
                {
                    "Quantity": 1,
                    "TrackingNumber": "1TTTTN4421"
                }
            ]
        }
    ]
}

OrderFull

GET All Orders for a Company

Request

GET /Companies({CompanyId})/OrderFull

Example Request

GET /Companies(14146)/OrderFull
Authorization: Bearer (Access Token)
Accept: application/json

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



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

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
[
    {
        "Id": "cdd26b8f-4ed1-409d-9984-982e081c425e",
        "Name": "iPhone 5 Order",
        "BillingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
        "BillingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
        "CreatedDateUtc": "2015-03-27T18:47:29.9012402+00:00",
        "DiscountAmount": 15,
        "DiscountCode": "MTRY-15",
        "DiscountDescription": "Military discount",
        "EmployeeId": 15,
        "EntityId": 14202,
        "OrderExpiryDate": "2015-05-05T14:32:05.9140188+00:00",
        "OrderExpiryHours": 20,
        "OrderType": "Sales",
        "OrderTypeId": 3,
        "PrintableId": "8765-1234-987",
        "ShippingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
        "ShippingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
        "ShippingEntityId": 14202,
        "State": "Created",
        "TenderId": "INV112",
        "Items": [
            {
                "Id": "8592718e-bcca-468c-8009-38678929b693",
                "Cost": 5.99,
                "Description": "Samsung Galaxy S4 Standard Battery",
                "ItemStatus": "New",
                "ItemStatusId": 1,
                "ItemType": "DropShip",
                "ItemTypeId": "1",
                "Index": 0,
                "ListPrice": 12.99,
                "Notes": "Dented corner",
                "OrderId": "cdd26b8f-4ed1-409d-9984-982e081c425e",
                "ProductId": "a183f1a9-c58f-426a-930a-9a6357db52ed",
                "Quantity": 2,
                "SellingPrice": 9.99,
                "SerialNumbers": [
                    "abc321"
                ],
                "SKU": "00001",
                "ShippingOptionId": "1",
                "SupplierEntityId": 14107,
                "SupplierReference": "10",
                "TrackingInformation": [
                    {
                        "Quantity": 1,
                        "TrackingNumber": "1TTTTN4421"
                    }
                ]
            }
        ]
    }
]

Array[OrderFull]

GET an Order with Items

Request

GET /Companies({CompanyId})/OrderFull({OrderId})

Example Request

GET /Companies(14146)/OrderFull(2ad88692-7757-4a72-915b-dfe8f2539279)
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://orderdemo.iqmetrix.net/v1/Companies(14146)/OrderFull(2ad88692-7757-4a72-915b-dfe8f2539279)" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingAnOrderWithItems()
{
    var client = new RestClient("https://orderdemo.iqmetrix.net/v1/Companies(14146)/OrderFull(2ad88692-7757-4a72-915b-dfe8f2539279)");
    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 GettingAnOrderWithItems() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://orderdemo.iqmetrix.net/v1/Companies(14146)/OrderFull(2ad88692-7757-4a72-915b-dfe8f2539279)");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://orderdemo.iqmetrix.net/v1/Companies(14146)/OrderFull(2ad88692-7757-4a72-915b-dfe8f2539279)', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
{
    "Id": "cdd26b8f-4ed1-409d-9984-982e081c425e",
    "Name": "iPhone 5 Order",
    "BillingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "BillingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "CreatedDateUtc": "2015-03-27T18:47:29.9012402+00:00",
    "DiscountAmount": 15,
    "DiscountCode": "MTRY-15",
    "DiscountDescription": "Military discount",
    "EmployeeId": 15,
    "EntityId": 14202,
    "OrderExpiryDate": "2015-05-05T14:32:05.9140188+00:00",
    "OrderExpiryHours": 20,
    "OrderType": "Sales",
    "OrderTypeId": 3,
    "PrintableId": "8765-1234-987",
    "ShippingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "ShippingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ShippingEntityId": 14202,
    "State": "Created",
    "TenderId": "INV112",
    "Items": [
        {
            "Id": "8592718e-bcca-468c-8009-38678929b693",
            "Cost": 5.99,
            "Description": "Samsung Galaxy S4 Standard Battery",
            "ItemStatus": "New",
            "ItemStatusId": 1,
            "ItemType": "DropShip",
            "ItemTypeId": "1",
            "Index": 0,
            "ListPrice": 12.99,
            "Notes": "Dented corner",
            "OrderId": "cdd26b8f-4ed1-409d-9984-982e081c425e",
            "ProductId": "a183f1a9-c58f-426a-930a-9a6357db52ed",
            "Quantity": 2,
            "SellingPrice": 9.99,
            "SerialNumbers": [
                "abc321"
            ],
            "SKU": "00001",
            "ShippingOptionId": "1",
            "SupplierEntityId": 14107,
            "SupplierReference": "10",
            "TrackingInformation": [
                {
                    "Quantity": 1,
                    "TrackingNumber": "1TTTTN4421"
                }
            ]
        }
    ]
}

OrderFull

PUT an Order with Items

The OrderId in the URI must match the OrderId used in the request parameters
Note An OrderFull can only be updated in the Pending or Created state

Request

PUT /Companies({CompanyId})/OrderFull({OrderId})

Example Request

PUT /Companies(14146)/OrderFull(2ad88692-7757-4a72-915b-dfe8f2539279)
Authorization: Bearer (Access Token)
Accept: application/json
Content-Type: application/json

{
    "Id": "cdd26b8f-4ed1-409d-9984-982e081c425e",
    "Name": "iPhone 5 Order",
    "BillingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "BillingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "CreatedDateUtc": "2015-03-27T18:47:29.9012402+00:00",
    "DiscountAmount": 15,
    "DiscountCode": "MTRY-15",
    "DiscountDescription": "Military discount",
    "EmployeeId": 15,
    "EntityId": 14202,
    "OrderExpiryDate": "2015-05-05T14:32:05.9140188+00:00",
    "OrderExpiryHours": 20,
    "OrderType": "Sales",
    "OrderTypeId": 3,
    "PrintableId": "8765-1234-987",
    "ShippingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "ShippingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ShippingEntityId": 14202,
    "State": "Created",
    "TenderId": "INV112",
    "Items": [
        {
            "Id": "8592718e-bcca-468c-8009-38678929b693",
            "Cost": 5.99,
            "Description": "Samsung Galaxy S4 Standard Battery",
            "ItemStatus": "New",
            "ItemStatusId": 1,
            "ItemType": "DropShip",
            "ItemTypeId": "1",
            "Index": 0,
            "ListPrice": 12.99,
            "Notes": "Dented corner",
            "OrderId": "cdd26b8f-4ed1-409d-9984-982e081c425e",
            "ProductId": "a183f1a9-c58f-426a-930a-9a6357db52ed",
            "Quantity": 2,
            "SellingPrice": 9.99,
            "SerialNumbers": [
                "abc321"
            ],
            "SKU": "00001",
            "ShippingOptionId": "1",
            "SupplierEntityId": 14107,
            "SupplierReference": "10",
            "TrackingInformation": [
                {
                    "Quantity": 1,
                    "TrackingNumber": "1TTTTN4421"
                }
            ]
        }
    ]
}
curl -X PUT "https://orderdemo.iqmetrix.net/v1/Companies(14146)/OrderFull(2ad88692-7757-4a72-915b-dfe8f2539279)" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json" -H "Content-Type: application/json" -d '{
    "Id": "cdd26b8f-4ed1-409d-9984-982e081c425e",
    "Name": "iPhone 5 Order",
    "BillingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "BillingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "CreatedDateUtc": "2015-03-27T18:47:29.9012402+00:00",
    "DiscountAmount": 15,
    "DiscountCode": "MTRY-15",
    "DiscountDescription": "Military discount",
    "EmployeeId": 15,
    "EntityId": 14202,
    "OrderExpiryDate": "2015-05-05T14:32:05.9140188+00:00",
    "OrderExpiryHours": 20,
    "OrderType": "Sales",
    "OrderTypeId": 3,
    "PrintableId": "8765-1234-987",
    "ShippingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "ShippingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ShippingEntityId": 14202,
    "State": "Created",
    "TenderId": "INV112",
    "Items": [
        {
            "Id": "8592718e-bcca-468c-8009-38678929b693",
            "Cost": 5.99,
            "Description": "Samsung Galaxy S4 Standard Battery",
            "ItemStatus": "New",
            "ItemStatusId": 1,
            "ItemType": "DropShip",
            "ItemTypeId": "1",
            "Index": 0,
            "ListPrice": 12.99,
            "Notes": "Dented corner",
            "OrderId": "cdd26b8f-4ed1-409d-9984-982e081c425e",
            "ProductId": "a183f1a9-c58f-426a-930a-9a6357db52ed",
            "Quantity": 2,
            "SellingPrice": 9.99,
            "SerialNumbers": [
                "abc321"
            ],
            "SKU": "00001",
            "ShippingOptionId": "1",
            "SupplierEntityId": 14107,
            "SupplierReference": "10",
            "TrackingInformation": [
                {
                    "Quantity": 1,
                    "TrackingNumber": "1TTTTN4421"
                }
            ]
        }
    ]
}'
static IRestResponse UpdatingAnOrderWithItems()
{
    var client = new RestClient("https://orderdemo.iqmetrix.net/v1/Companies(14146)/OrderFull(2ad88692-7757-4a72-915b-dfe8f2539279)");
    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\":\"cdd26b8f-4ed1-409d-9984-982e081c425e\",\"Name\":\"iPhone 5 Order\",\"BillingAddressId\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"BillingCustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"CreatedDateUtc\":\"2015-03-27T18:47:29.9012402+00:00\",\"DiscountAmount\":15,\"DiscountCode\":\"MTRY-15\",\"DiscountDescription\":\"Military discount\",\"EmployeeId\":15,\"EntityId\":14202,\"OrderExpiryDate\":\"2015-05-05T14:32:05.9140188+00:00\",\"OrderExpiryHours\":20,\"OrderType\":\"Sales\",\"OrderTypeId\":3,\"PrintableId\":\"8765-1234-987\",\"ShippingAddressId\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"ShippingCustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ShippingEntityId\":14202,\"State\":\"Created\",\"TenderId\":\"INV112\",\"Items\":[{\"Id\":\"8592718e-bcca-468c-8009-38678929b693\",\"Cost\":5.99,\"Description\":\"Samsung Galaxy S4 Standard Battery\",\"ItemStatus\":\"New\",\"ItemStatusId\":1,\"ItemType\":\"DropShip\",\"ItemTypeId\":\"1\",\"Index\":0,\"ListPrice\":12.99,\"Notes\":\"Dented corner\",\"OrderId\":\"cdd26b8f-4ed1-409d-9984-982e081c425e\",\"ProductId\":\"a183f1a9-c58f-426a-930a-9a6357db52ed\",\"Quantity\":2,\"SellingPrice\":9.99,\"SerialNumbers\":[\"abc321\"],\"SKU\":\"00001\",\"ShippingOptionId\":\"1\",\"SupplierEntityId\":14107,\"SupplierReference\":\"10\",\"TrackingInformation\":[{\"Quantity\":1,\"TrackingNumber\":\"1TTTTN4421\"}]}]}", 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 UpdatingAnOrderWithItems() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpPut request = new HttpPut("https://orderdemo.iqmetrix.net/v1/Companies(14146)/OrderFull(2ad88692-7757-4a72-915b-dfe8f2539279)");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    request.addHeader("Content-Type", "application/json"); 
    StringEntity body = new StringEntity("{\"Id\":\"cdd26b8f-4ed1-409d-9984-982e081c425e\",\"Name\":\"iPhone 5 Order\",\"BillingAddressId\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"BillingCustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"CreatedDateUtc\":\"2015-03-27T18:47:29.9012402+00:00\",\"DiscountAmount\":15,\"DiscountCode\":\"MTRY-15\",\"DiscountDescription\":\"Military discount\",\"EmployeeId\":15,\"EntityId\":14202,\"OrderExpiryDate\":\"2015-05-05T14:32:05.9140188+00:00\",\"OrderExpiryHours\":20,\"OrderType\":\"Sales\",\"OrderTypeId\":3,\"PrintableId\":\"8765-1234-987\",\"ShippingAddressId\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"ShippingCustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ShippingEntityId\":14202,\"State\":\"Created\",\"TenderId\":\"INV112\",\"Items\":[{\"Id\":\"8592718e-bcca-468c-8009-38678929b693\",\"Cost\":5.99,\"Description\":\"Samsung Galaxy S4 Standard Battery\",\"ItemStatus\":\"New\",\"ItemStatusId\":1,\"ItemType\":\"DropShip\",\"ItemTypeId\":\"1\",\"Index\":0,\"ListPrice\":12.99,\"Notes\":\"Dented corner\",\"OrderId\":\"cdd26b8f-4ed1-409d-9984-982e081c425e\",\"ProductId\":\"a183f1a9-c58f-426a-930a-9a6357db52ed\",\"Quantity\":2,\"SellingPrice\":9.99,\"SerialNumbers\":[\"abc321\"],\"SKU\":\"00001\",\"ShippingOptionId\":\"1\",\"SupplierEntityId\":14107,\"SupplierReference\":\"10\",\"TrackingInformation\":[{\"Quantity\":1,\"TrackingNumber\":\"1TTTTN4421\"}]}]}");
    request.setEntity(body);
    
    return httpClient.execute(request);
}
require 'rest-client'

body = "{\"Id\":\"cdd26b8f-4ed1-409d-9984-982e081c425e\",\"Name\":\"iPhone 5 Order\",\"BillingAddressId\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"BillingCustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"CreatedDateUtc\":\"2015-03-27T18:47:29.9012402+00:00\",\"DiscountAmount\":15,\"DiscountCode\":\"MTRY-15\",\"DiscountDescription\":\"Military discount\",\"EmployeeId\":15,\"EntityId\":14202,\"OrderExpiryDate\":\"2015-05-05T14:32:05.9140188+00:00\",\"OrderExpiryHours\":20,\"OrderType\":\"Sales\",\"OrderTypeId\":3,\"PrintableId\":\"8765-1234-987\",\"ShippingAddressId\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"ShippingCustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ShippingEntityId\":14202,\"State\":\"Created\",\"TenderId\":\"INV112\",\"Items\":[{\"Id\":\"8592718e-bcca-468c-8009-38678929b693\",\"Cost\":5.99,\"Description\":\"Samsung Galaxy S4 Standard Battery\",\"ItemStatus\":\"New\",\"ItemStatusId\":1,\"ItemType\":\"DropShip\",\"ItemTypeId\":\"1\",\"Index\":0,\"ListPrice\":12.99,\"Notes\":\"Dented corner\",\"OrderId\":\"cdd26b8f-4ed1-409d-9984-982e081c425e\",\"ProductId\":\"a183f1a9-c58f-426a-930a-9a6357db52ed\",\"Quantity\":2,\"SellingPrice\":9.99,\"SerialNumbers\":[\"abc321\"],\"SKU\":\"00001\",\"ShippingOptionId\":\"1\",\"SupplierEntityId\":14107,\"SupplierReference\":\"10\",\"TrackingInformation\":[{\"Quantity\":1,\"TrackingNumber\":\"1TTTTN4421\"}]}]}";

response = RestClient.put 'https://orderdemo.iqmetrix.net/v1/Companies(14146)/OrderFull(2ad88692-7757-4a72-915b-dfe8f2539279)', 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": "cdd26b8f-4ed1-409d-9984-982e081c425e",
    "Name": "iPhone 5 Order",
    "BillingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "BillingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "CreatedDateUtc": "2015-03-27T18:47:29.9012402+00:00",
    "DiscountAmount": 15,
    "DiscountCode": "MTRY-15",
    "DiscountDescription": "Military discount",
    "EmployeeId": 15,
    "EntityId": 14202,
    "OrderExpiryDate": "2015-05-05T14:32:05.9140188+00:00",
    "OrderExpiryHours": 20,
    "OrderType": "Sales",
    "OrderTypeId": 3,
    "PrintableId": "8765-1234-987",
    "ShippingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "ShippingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ShippingEntityId": 14202,
    "State": "Created",
    "TenderId": "INV112",
    "Items": [
        {
            "Id": "8592718e-bcca-468c-8009-38678929b693",
            "Cost": 5.99,
            "Description": "Samsung Galaxy S4 Standard Battery",
            "ItemStatus": "New",
            "ItemStatusId": 1,
            "ItemType": "DropShip",
            "ItemTypeId": "1",
            "Index": 0,
            "ListPrice": 12.99,
            "Notes": "Dented corner",
            "OrderId": "cdd26b8f-4ed1-409d-9984-982e081c425e",
            "ProductId": "a183f1a9-c58f-426a-930a-9a6357db52ed",
            "Quantity": 2,
            "SellingPrice": 9.99,
            "SerialNumbers": [
                "abc321"
            ],
            "SKU": "00001",
            "ShippingOptionId": "1",
            "SupplierEntityId": 14107,
            "SupplierReference": "10",
            "TrackingInformation": [
                {
                    "Quantity": 1,
                    "TrackingNumber": "1TTTTN4421"
                }
            ]
        }
    ]
}

OrderFull

GET Pending Orders by Location

Request

GET /Companies({CompanyId})/Orders?$filter=State eq 'Pending' and EntityId eq {LocationId}

Example Request

GET /Companies(14146)/Orders?$filter=State eq 'Pending' and EntityId eq 14202
Authorization: Bearer (Access Token)
Accept: application/json

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



response = RestClient.get 'https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders?$filter=State eq 'Pending' and EntityId eq 14202', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
[
    {
        "Id": "cdd26b8f-4ed1-409d-9984-982e081c425e",
        "Name": "iPhone 5 Order",
        "BillingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
        "BillingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
        "CreatedDateUtc": "2015-03-27T18:47:29.9012402+00:00",
        "DiscountAmount": 15,
        "DiscountCode": "MTRY-15",
        "DiscountDescription": "Military discount",
        "EmployeeId": 15,
        "EntityId": 14202,
        "OrderExpiryDate": "2015-05-05T14:32:05.9140188+00:00",
        "OrderExpiryHours": 20,
        "OrderType": "Sales",
        "OrderTypeId": 3,
        "PrintableId": "8765-1234-987",
        "ShippingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
        "ShippingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
        "ShippingEntityId": 14202,
        "State": "Created",
        "TenderId": "TT101IN18"
    }
]

Array[Order]

GET Orders by PrintableId

PrintableId is an identifier for an Order that can used to print on invoices. This request is useful for searching for an Order using a previously printed or saved invoice.

Request

GET /Companies({CompanyId})/Orders?$filter=PrintableId eq '{PrintableId}'

Example Request

GET /Companies(14146)/Orders?$filter=PrintableId eq 'TT101IN18'
Authorization: Bearer (Access Token)
Accept: application/json

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



response = RestClient.get 'https://orderdemo.iqmetrix.net/v1/Companies(14146)/Orders?$filter=PrintableId eq 'TT101IN18'', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
[
    {
        "Id": "cdd26b8f-4ed1-409d-9984-982e081c425e",
        "Name": "iPhone 5 Order",
        "BillingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
        "BillingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
        "CreatedDateUtc": "2015-03-27T18:47:29.9012402+00:00",
        "DiscountAmount": 15,
        "DiscountCode": "MTRY-15",
        "DiscountDescription": "Military discount",
        "EmployeeId": 15,
        "EntityId": 14202,
        "OrderExpiryDate": "2015-05-05T14:32:05.9140188+00:00",
        "OrderExpiryHours": 20,
        "OrderType": "Sales",
        "OrderTypeId": 3,
        "PrintableId": "8765-1234-987",
        "ShippingAddressId": "a08b0640-606a-41f0-901a-facaf50e75dd",
        "ShippingCustomerId": "659c2a38-d083-4421-9330-46d779702f85",
        "ShippingEntityId": 14202,
        "State": "Created",
        "TenderId": "TT101IN18"
    }
]

Array[Order]

ERRORS

Error Code Description Reason
HTTP 400 Bad Request Billing Customer (id={x}) not found for company {y}. Proccessing an Order requires a Billing Customer on the Order
HTTP 400 Bad Request The request could not be understood by the server. The message returned in the response body will give more details on why the request was invalid
HTTP 400 Entity is not related to company Ensure the EntityId and ShippingEntityId used in the request belongs to the Company specified in the URI
HTTP 400 The request is invalid Ensure the OrderId used in the request matches the OrderId used in the URI
HTTP 400 Uri parameter representing resource id and resource
id found in the request content don't match
Ensure the OrderId used in the request matches the OrderId used in the URI
HTTP 404 Order resource with id {x} cannot be found Ensure the provided OrderId is correct
HTTP 409 Conflict Order expired and can no longer be updated
HTTP 409 Resource state transition from {x} to {y} is invalid Order state can only be manually updated from Created to Pending
HTTP 500 An error has occurred Ensure the provided Tracking Number is valid
Was this page helpful?