API Documentation

In-depth reference documentation for iQmetrix API's.

NAV

OVERVIEW

This is a DRAFT specification provided for apprasial use only, this API is not finalized and is subject to change without notice

ENDPOINTS

Sandbox: https://salesorderdemo.iqmetrix.net/v1
Production: https://salesorder.iqmetrix.net/v1

RESOURCES

SaleOrder

{
    "Id": "addbcea6-5f28-0c0a-027a-6fbc6b768f71",
    "DateCreatedUtc": "2016-01-01T16:00:00",
    "CompanyId": 14146,
    "LocationId": 14192,
    "CustomerId": "a61ebc5a-b85f-66a3-dec3-260637dd796c",
    "ExpiryDateUtc": "2016-01-30T16:00:00",
    "Items": [
        {
            "LineNumber": 1,
            "SaleOrderId": "1a7ae136-907c-3b3d-49f6-1c001c598bf2",
            "ProductCatalogId": "55c8b270-63b9-a095-d975-9a730b3dacb4",
            "Quantity": 1,
            "CorrelationId": "6716053127",
            "Price": 99.98,
            "PricingTermId": "2",
            "TaxLineItems": [
                {
                    "TaxableAmount": 100,
                    "Rate": 1,
                    "Tax": 1
                }
            ]
        }
    ],
    "Payments": [
        {
            "Id": "c3c6647b-04b6-e5d9-1a89-1c1a367985b9",
            "SaleOrderId": "c3c6647b-04b6-e5d9-1a89-1c1a367985b9",
            "AuthCode": "CMC623",
            "TransactionNumber": "CE507EA008F65516",
            "Token": "685576",
            "Amount": 0,
            "CorrelationId": "TN15123X"
        }
    ],
    "BillingAddressId": "1e93b1bc-ecf7-46f5-8be4-e20284e0df36",
    "ShippingAddressId": "8f49e60a-5714-4fd2-9d68-223114227011",
    "ShippingLineItems": [
        {
            "Type": "USPS",
            "Amount": 9.99,
            "CorrelationId": "6716053127",
            "AssociatedItemIds": [
                "1a438dd5-b32b-4a1e-82f0-f3be09e3544d"
            ]
        }
    ],
    "DiscountLineItems": [
        {
            "Amount": 2.99,
            "Name": "BOGO 50",
            "DiscountCode": "M5512323DD1",
            "AssociatedItemIds": [
                "57ad865d-fe0f-44de-8055-bc04f2bc1b4a"
            ]
        }
    ],
    "PrintableId": "5612341"
}
Name Description  
Id (GUID) Unique identifier  
DateCreatedUtc (DateTime) Created date  
CompanyId (Integer) Identifier for a Company  
LocationId (Integer) Identifier for a Location  
CustomerId (GUID) Identifier for a Customer  
ExpiryDateUtc (String) Expiration date  
Items (Array[SaleOrderItem]) Items on the Sale Order  
Payments (Array[Payment]) Payments  
BillingAddressId (GUID) Identifier for a customer billing Address  
ShippingAddressId (GUID) Identifier for a customer shipping Address  
ShippingLineItems (Array[ShippingLineItem]) A list of shipping line items associated with all or parts of this SalesOrder  
DiscountLineItems (Array[DiscountLineItem]) A list of discount line items associated with all or parts of this SalesOrder  
PrintableId (String) Identifier from an external system  
TaxCalculationResultId (GUID) Identifier for a tax calculation, for internal use only  

SaleOrderItem

{
    "LineNumber": 1,
    "SaleOrderId": "1a7ae136-907c-3b3d-49f6-1c001c598bf2",
    "ProductCatalogId": "55c8b270-63b9-a095-d975-9a730b3dacb4",
    "Quantity": 1,
    "CorrelationId": "6716053127",
    "Price": 99.98,
    "PricingTermId": "2",
    "TaxLineItems": [
        {
            "TaxableAmount": 100,
            "Rate": 1,
            "Tax": 1
        }
    ]
}
Name Description
LineNumber (Integer) Identifier of the Line Item
SaleOrderId (GUID) Identifier of the parent SaleOrder
ProductCatalogId (GUID) Identifier for a CatalogItem
Quantity (Integer) Quantity
CorrelationId (String) A correlation to shipping information in another system
Price (Integer) Price
PricingTermId (String) Identifier for a PricingTerm
TaxLineItems (Array[TaxLineItem]) A list of taxes associated with all or parts of this SalesOrder

Payment

{
    "Id": "c3c6647b-04b6-e5d9-1a89-1c1a367985b9",
    "SaleOrderId": "c3c6647b-04b6-e5d9-1a89-1c1a367985b9",
    "AuthCode": "CMC623",
    "TransactionNumber": "CE507EA008F65516",
    "Token": "685576",
    "Amount": 0,
    "CorrelationId": "TN15123X"
}
Name Description  
Id (GUID) Unique identifier  
SaleOrderId (GUID) Identifier of the SaleOrder  
AuthCode (String) Auth Code  
TransactionNumber (String) Transaction Number  
Token (String) Token  
Amount (Decimal) Amount  
CorrelationId (String) A correlation with a payment in another system  
PaymentMethodId (GUID) Identifier for a payment method, for internal use only  

TaxLineItem

A tax line item which corresponds to a line item on the sales order

{
    "TaxableAmount": 100,
    "Rate": 1,
    "Tax": 1
}
Name Description  
TaxableAmount (Decimal) Taxable amount  
Rate (Decimal) Effective tax rate  
Tax (Decimal) Tax amount to charged  
IqTaxServiceId (GUID) For internal use only  

TaxDetail

{
    "TaxId": "321",
    "CountryCode": "CA",
    "RegionCode": "AB",
    "TaxType": "Sales Tax",
    "TaxAuthority": "IRS",
    "TaxAuthorityType": "Internal Revenue Service",
    "Rate": 4,
    "Tax": 9,
    "Taxable": 2,
    "UnitTax": 1,
    "TaxName": "Sales Tax",
    "EffectiveZoneLevel": "Atlanta"
}
Name Description
TaxId (String) Identifier from the source system for the tax rate
CountryCode (String) Country Code. Uses the ISO 3166-1 alpha-2 standard
RegionCode (String) Code for a State/Province. Based off the ISO 3166-2 standard.
TaxType (String) Type of tax rate
TaxAuthority (String) Tax authority tax is to be reported to
TaxAuthorityType (String) Tax authority description
Rate (Decimal) Effective tax rate
Tax (Decimal) Tax amount for tax jurisdiction
Taxable (Decimal) Taxable amount on the line
UnitTax (Decimal) Tax amount per unit
TaxName (String) Description
EffectiveZoneLevel (String) Effective zone level

ShippingLineItem

{
    "Type": "USPS",
    "Amount": 9.99,
    "CorrelationId": "6716053127",
    "AssociatedItemIds": [
        "1a438dd5-b32b-4a1e-82f0-f3be09e3544d"
    ]
}
Name Description
Type (String) Shipping type
Amount (Decimal) Shipping amount
CorrelationId (String) A correlation to shipping information in another system
AssociatedItemIds (Array[string]) Any specific items that this shipping line item is associated with

DiscountLineItem

{
    "Amount": 2.99,
    "Name": "BOGO 50",
    "DiscountCode": "M5512323DD1",
    "AssociatedItemIds": [
        "57ad865d-fe0f-44de-8055-bc04f2bc1b4a"
    ]
}
Name Description
Amount (Decimal) Amount discounted
Name (String) Discount name
DiscountCode (String) Discount code
AssociatedItemIds (Array[string]) Any specific items that this discount is associated with

REQUESTS

GET a Sale Order

Request

GET /Companies({CompanyId})/SaleOrder({SaleOrderId})

Example Request

GET /Companies(14146)/SaleOrder(94ec8140-4a8a-4b97-ad0a-c5c463694ca7)
Authorization: Bearer (Access Token)
Accept: application/json

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



response = RestClient.get 'https://salesorderdemo.iqmetrix.net/v1/Companies(14146)/SaleOrder(94ec8140-4a8a-4b97-ad0a-c5c463694ca7)', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
{
    "Id": "addbcea6-5f28-0c0a-027a-6fbc6b768f71",
    "DateCreatedUtc": "2016-01-01T16:00:00",
    "CompanyId": 14146,
    "LocationId": 14192,
    "CustomerId": "a61ebc5a-b85f-66a3-dec3-260637dd796c",
    "ExpiryDateUtc": "2016-01-30T16:00:00",
    "Items": [
        {
            "LineNumber": 1,
            "SaleOrderId": "1a7ae136-907c-3b3d-49f6-1c001c598bf2",
            "ProductCatalogId": "55c8b270-63b9-a095-d975-9a730b3dacb4",
            "Quantity": 1,
            "CorrelationId": "6716053127",
            "Price": 99.98,
            "PricingTermId": "2",
            "TaxLineItems": [
                {
                    "TaxableAmount": 100,
                    "Rate": 1,
                    "Tax": 1
                }
            ]
        }
    ],
    "Payments": [
        {
            "Id": "c3c6647b-04b6-e5d9-1a89-1c1a367985b9",
            "SaleOrderId": "c3c6647b-04b6-e5d9-1a89-1c1a367985b9",
            "AuthCode": "CMC623",
            "TransactionNumber": "CE507EA008F65516",
            "Token": "685576",
            "Amount": 0,
            "CorrelationId": "TN15123X"
        }
    ],
    "BillingAddressId": "1e93b1bc-ecf7-46f5-8be4-e20284e0df36",
    "ShippingAddressId": "8f49e60a-5714-4fd2-9d68-223114227011",
    "ShippingLineItems": [
        {
            "Type": "USPS",
            "Amount": 9.99,
            "CorrelationId": "6716053127",
            "AssociatedItemIds": [
                "1a438dd5-b32b-4a1e-82f0-f3be09e3544d"
            ]
        }
    ],
    "DiscountLineItems": [
        {
            "Amount": 2.99,
            "Name": "BOGO 50",
            "DiscountCode": "M5512323DD1",
            "AssociatedItemIds": [
                "57ad865d-fe0f-44de-8055-bc04f2bc1b4a"
            ]
        }
    ],
    "PrintableId": "5612341"
}

SaleOrder

POST a Sale Order

Request

POST /Companies({CompanyId})/SaleOrder

Example Request

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

{
    "DateCreatedUtc": "2016-01-01T16:00:00",
    "LocationId": 14192,
    "CustomerId": "a61ebc5a-b85f-66a3-dec3-260637dd796c",
    "ExpiryDateUtc": "2016-01-30T16:00:00",
    "Items": [
        {
            "LineNumber": 1,
            "ProductCatalogId": "55c8b270-63b9-a095-d975-9a730b3dacb4",
            "Quantity": 1,
            "CorrelationId": "6716053127",
            "Price": 99.98,
            "PricingTermId": "2",
            "TaxLineItems": [
                {
                    "TaxableAmount": 100,
                    "Rate": 1,
                    "Tax": 1
                }
            ]
        }
    ],
    "Payments": [
        {
            "AuthCode": "CMC623",
            "TransactionNumber": "CE507EA008F65516",
            "Token": "685576",
            "Amount": 0,
            "CorrelationId": "TN15123X"
        }
    ],
    "BillingAddressId": "1e93b1bc-ecf7-46f5-8be4-e20284e0df36",
    "ShippingAddressId": "8f49e60a-5714-4fd2-9d68-223114227011",
    "ShippingLineItems": [
        {
            "Type": "USPS",
            "Amount": 9.99,
            "CorrelationId": "6716053127",
            "AssociatedItemIds": [
                "1a438dd5-b32b-4a1e-82f0-f3be09e3544d"
            ]
        }
    ],
    "DiscountLineItems": [
        {
            "Amount": 2.99,
            "Name": "BOGO 50",
            "DiscountCode": "M5512323DD1",
            "AssociatedItemIds": [
                "57ad865d-fe0f-44de-8055-bc04f2bc1b4a"
            ]
        }
    ],
    "PrintableId": "5612341"
}
curl -X POST "https://salesorderdemo.iqmetrix.net/v1/Companies(14146)/SaleOrder" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json" -H "Content-Type: application/json" -d '{
    "DateCreatedUtc": "2016-01-01T16:00:00",
    "LocationId": 14192,
    "CustomerId": "a61ebc5a-b85f-66a3-dec3-260637dd796c",
    "ExpiryDateUtc": "2016-01-30T16:00:00",
    "Items": [
        {
            "LineNumber": 1,
            "ProductCatalogId": "55c8b270-63b9-a095-d975-9a730b3dacb4",
            "Quantity": 1,
            "CorrelationId": "6716053127",
            "Price": 99.98,
            "PricingTermId": "2",
            "TaxLineItems": [
                {
                    "TaxableAmount": 100,
                    "Rate": 1,
                    "Tax": 1
                }
            ]
        }
    ],
    "Payments": [
        {
            "AuthCode": "CMC623",
            "TransactionNumber": "CE507EA008F65516",
            "Token": "685576",
            "Amount": 0,
            "CorrelationId": "TN15123X"
        }
    ],
    "BillingAddressId": "1e93b1bc-ecf7-46f5-8be4-e20284e0df36",
    "ShippingAddressId": "8f49e60a-5714-4fd2-9d68-223114227011",
    "ShippingLineItems": [
        {
            "Type": "USPS",
            "Amount": 9.99,
            "CorrelationId": "6716053127",
            "AssociatedItemIds": [
                "1a438dd5-b32b-4a1e-82f0-f3be09e3544d"
            ]
        }
    ],
    "DiscountLineItems": [
        {
            "Amount": 2.99,
            "Name": "BOGO 50",
            "DiscountCode": "M5512323DD1",
            "AssociatedItemIds": [
                "57ad865d-fe0f-44de-8055-bc04f2bc1b4a"
            ]
        }
    ],
    "PrintableId": "5612341"
}'
static IRestResponse CreatingASaleOrder()
{
    var client = new RestClient("https://salesorderdemo.iqmetrix.net/v1/Companies(14146)/SaleOrder");
    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", "{\"DateCreatedUtc\":\"2016-01-01T16:00:00\",\"LocationId\":14192,\"CustomerId\":\"a61ebc5a-b85f-66a3-dec3-260637dd796c\",\"ExpiryDateUtc\":\"2016-01-30T16:00:00\",\"Items\":[{\"LineNumber\":1,\"ProductCatalogId\":\"55c8b270-63b9-a095-d975-9a730b3dacb4\",\"Quantity\":1,\"CorrelationId\":\"6716053127\",\"Price\":99.98,\"PricingTermId\":\"2\",\"TaxLineItems\":[{\"TaxableAmount\":100,\"Rate\":1,\"Tax\":1}]}],\"Payments\":[{\"AuthCode\":\"CMC623\",\"TransactionNumber\":\"CE507EA008F65516\",\"Token\":\"685576\",\"Amount\":0,\"CorrelationId\":\"TN15123X\"}],\"BillingAddressId\":\"1e93b1bc-ecf7-46f5-8be4-e20284e0df36\",\"ShippingAddressId\":\"8f49e60a-5714-4fd2-9d68-223114227011\",\"ShippingLineItems\":[{\"Type\":\"USPS\",\"Amount\":9.99,\"CorrelationId\":\"6716053127\",\"AssociatedItemIds\":[\"1a438dd5-b32b-4a1e-82f0-f3be09e3544d\"]}],\"DiscountLineItems\":[{\"Amount\":2.99,\"Name\":\"BOGO 50\",\"DiscountCode\":\"M5512323DD1\",\"AssociatedItemIds\":[\"57ad865d-fe0f-44de-8055-bc04f2bc1b4a\"]}],\"PrintableId\":\"5612341\"}", 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 CreatingASaleOrder() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpPost request = new HttpPost("https://salesorderdemo.iqmetrix.net/v1/Companies(14146)/SaleOrder");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    request.addHeader("Content-Type", "application/json"); 
    StringEntity body = new StringEntity("{\"DateCreatedUtc\":\"2016-01-01T16:00:00\",\"LocationId\":14192,\"CustomerId\":\"a61ebc5a-b85f-66a3-dec3-260637dd796c\",\"ExpiryDateUtc\":\"2016-01-30T16:00:00\",\"Items\":[{\"LineNumber\":1,\"ProductCatalogId\":\"55c8b270-63b9-a095-d975-9a730b3dacb4\",\"Quantity\":1,\"CorrelationId\":\"6716053127\",\"Price\":99.98,\"PricingTermId\":\"2\",\"TaxLineItems\":[{\"TaxableAmount\":100,\"Rate\":1,\"Tax\":1}]}],\"Payments\":[{\"AuthCode\":\"CMC623\",\"TransactionNumber\":\"CE507EA008F65516\",\"Token\":\"685576\",\"Amount\":0,\"CorrelationId\":\"TN15123X\"}],\"BillingAddressId\":\"1e93b1bc-ecf7-46f5-8be4-e20284e0df36\",\"ShippingAddressId\":\"8f49e60a-5714-4fd2-9d68-223114227011\",\"ShippingLineItems\":[{\"Type\":\"USPS\",\"Amount\":9.99,\"CorrelationId\":\"6716053127\",\"AssociatedItemIds\":[\"1a438dd5-b32b-4a1e-82f0-f3be09e3544d\"]}],\"DiscountLineItems\":[{\"Amount\":2.99,\"Name\":\"BOGO 50\",\"DiscountCode\":\"M5512323DD1\",\"AssociatedItemIds\":[\"57ad865d-fe0f-44de-8055-bc04f2bc1b4a\"]}],\"PrintableId\":\"5612341\"}");
    request.setEntity(body);
    
    return httpClient.execute(request);
}
require 'rest-client'

body = "{\"DateCreatedUtc\":\"2016-01-01T16:00:00\",\"LocationId\":14192,\"CustomerId\":\"a61ebc5a-b85f-66a3-dec3-260637dd796c\",\"ExpiryDateUtc\":\"2016-01-30T16:00:00\",\"Items\":[{\"LineNumber\":1,\"ProductCatalogId\":\"55c8b270-63b9-a095-d975-9a730b3dacb4\",\"Quantity\":1,\"CorrelationId\":\"6716053127\",\"Price\":99.98,\"PricingTermId\":\"2\",\"TaxLineItems\":[{\"TaxableAmount\":100,\"Rate\":1,\"Tax\":1}]}],\"Payments\":[{\"AuthCode\":\"CMC623\",\"TransactionNumber\":\"CE507EA008F65516\",\"Token\":\"685576\",\"Amount\":0,\"CorrelationId\":\"TN15123X\"}],\"BillingAddressId\":\"1e93b1bc-ecf7-46f5-8be4-e20284e0df36\",\"ShippingAddressId\":\"8f49e60a-5714-4fd2-9d68-223114227011\",\"ShippingLineItems\":[{\"Type\":\"USPS\",\"Amount\":9.99,\"CorrelationId\":\"6716053127\",\"AssociatedItemIds\":[\"1a438dd5-b32b-4a1e-82f0-f3be09e3544d\"]}],\"DiscountLineItems\":[{\"Amount\":2.99,\"Name\":\"BOGO 50\",\"DiscountCode\":\"M5512323DD1\",\"AssociatedItemIds\":[\"57ad865d-fe0f-44de-8055-bc04f2bc1b4a\"]}],\"PrintableId\":\"5612341\"}";

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

puts response

URI Parameters

Request Parameters

Response Parameters

Example Response

HTTP 202 Content-Type: application/json
{
    "Id": "addbcea6-5f28-0c0a-027a-6fbc6b768f71",
    "DateCreatedUtc": "2016-01-01T16:00:00",
    "CompanyId": 14146,
    "LocationId": 14192,
    "CustomerId": "a61ebc5a-b85f-66a3-dec3-260637dd796c",
    "ExpiryDateUtc": "2016-01-30T16:00:00",
    "Items": [
        {
            "LineNumber": 1,
            "SaleOrderId": "1a7ae136-907c-3b3d-49f6-1c001c598bf2",
            "ProductCatalogId": "55c8b270-63b9-a095-d975-9a730b3dacb4",
            "Quantity": 1,
            "CorrelationId": "6716053127",
            "Price": 99.98,
            "PricingTermId": "2",
            "TaxLineItems": [
                {
                    "TaxableAmount": 100,
                    "Rate": 1,
                    "Tax": 1
                }
            ]
        }
    ],
    "Payments": [
        {
            "Id": "c3c6647b-04b6-e5d9-1a89-1c1a367985b9",
            "SaleOrderId": "c3c6647b-04b6-e5d9-1a89-1c1a367985b9",
            "AuthCode": "CMC623",
            "TransactionNumber": "CE507EA008F65516",
            "Token": "685576",
            "Amount": 0,
            "CorrelationId": "TN15123X"
        }
    ],
    "BillingAddressId": "1e93b1bc-ecf7-46f5-8be4-e20284e0df36",
    "ShippingAddressId": "8f49e60a-5714-4fd2-9d68-223114227011",
    "ShippingLineItems": [
        {
            "Type": "USPS",
            "Amount": 9.99,
            "CorrelationId": "6716053127",
            "AssociatedItemIds": [
                "1a438dd5-b32b-4a1e-82f0-f3be09e3544d"
            ]
        }
    ],
    "DiscountLineItems": [
        {
            "Amount": 2.99,
            "Name": "BOGO 50",
            "DiscountCode": "M5512323DD1",
            "AssociatedItemIds": [
                "57ad865d-fe0f-44de-8055-bc04f2bc1b4a"
            ]
        }
    ],
    "PrintableId": "5612341"
}

SaleOrder

GET All Sale Orders

Request

GET /Companies({CompanyId})/SaleOrder

Example Request

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

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



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

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
[
    {
        "Id": "addbcea6-5f28-0c0a-027a-6fbc6b768f71",
        "DateCreatedUtc": "2016-01-01T16:00:00",
        "CompanyId": 14146,
        "LocationId": 14192,
        "CustomerId": "a61ebc5a-b85f-66a3-dec3-260637dd796c",
        "ExpiryDateUtc": "2016-01-30T16:00:00",
        "Items": [
            {
                "LineNumber": 1,
                "SaleOrderId": "1a7ae136-907c-3b3d-49f6-1c001c598bf2",
                "ProductCatalogId": "55c8b270-63b9-a095-d975-9a730b3dacb4",
                "Quantity": 1,
                "CorrelationId": "6716053127",
                "Price": 99.98,
                "PricingTermId": "2",
                "TaxLineItems": [
                    {
                        "TaxableAmount": 100,
                        "Rate": 1,
                        "Tax": 1
                    }
                ]
            }
        ],
        "Payments": [
            {
                "Id": "c3c6647b-04b6-e5d9-1a89-1c1a367985b9",
                "SaleOrderId": "c3c6647b-04b6-e5d9-1a89-1c1a367985b9",
                "AuthCode": "CMC623",
                "TransactionNumber": "CE507EA008F65516",
                "Token": "685576",
                "Amount": 0,
                "CorrelationId": "TN15123X"
            }
        ],
        "BillingAddressId": "1e93b1bc-ecf7-46f5-8be4-e20284e0df36",
        "ShippingAddressId": "8f49e60a-5714-4fd2-9d68-223114227011",
        "ShippingLineItems": [
            {
                "Type": "USPS",
                "Amount": 9.99,
                "CorrelationId": "6716053127",
                "AssociatedItemIds": [
                    "1a438dd5-b32b-4a1e-82f0-f3be09e3544d"
                ]
            }
        ],
        "DiscountLineItems": [
            {
                "Amount": 2.99,
                "Name": "BOGO 50",
                "DiscountCode": "M5512323DD1",
                "AssociatedItemIds": [
                    "57ad865d-fe0f-44de-8055-bc04f2bc1b4a"
                ]
            }
        ],
        "PrintableId": "5612341"
    }
]

Array[SaleOrder]

Was this page helpful?