Before you can get started with using the API, you're going to need an account and an API key.
Please contact omnioms.apiproduct@tecsys.com if you're interested in creating an account or need more information on our APIs.
Your API keys can be found by going to Profile. Under Subscription details, click Show to see your key. You can regenerate your key at any time, but doing so makes your previous key invalid.
Our REST APIs allows you to interact with resources stored in the Omni™ OMS platform. You'll need an HTTP client in order to send requests to our APIs. In the following examples, we'll be using curl
as our HTTP client.
To retrieve the data for each custom field created, you will need the OwnerType of the custom field. (The object the custom field was created for. See custom fields for more information.) With the OwnerType, run the following command:
curl --request GET "https://api.dev.orderdynamics.net/v1/customfieldsmetadata/{ownertype}/" \
--header "Cache-control: no-cache" \
--header "Ocp-Apim-Subscription-Key: [YOUR_API_KEY]"
After making this HTTP call, you will receive a JSON response. This response will include all of the metadata for that specific custom field.
Many of the endpoints in our APIs require you to provide an inventory location. That's why for our first request we'll be getting all the inventory locations. In order to do this, run the following command in your terminal or command prompt:
curl --request GET "https://api.dev.orderdynamics.net/v1/inventorylocations/" \
--header "Cache-Control: no-cache" \
--header "Ocp-Apim-Subscription-Key: [YOUR_API_KEY]"
Make sure to replace [YOUR_API_KEY]
with one of the API keys in your Profile.
After making this HTTP call, you'll receive a JSON response. This response will include all the inventory locations and the basic data about those locations such as their addresses and internal names.
You can also have custom fields for your inventory location. With this API, you can update those custom fields as needed. Run the following command:
curl --request PUT "https://api.dev.orderdynamics.net/v1/inventorylocations/customfields" \
--header "Content-Type: application/json" \
--header "Cache-control: no-cache" \
--header "Ocp-Apim-Subscription-Key: [YOUR_API_KEY]" \
--data raw '{
"Custom Fields": [{
"Name": "string",
"Value": "string"
}],
"LocationName": "string"
}'
Make sure to replace [YOUR_API_KEY] with the API key from your profile and to fill out the data for the request in the request body.
This request will receive a JSON response of No Content if it was successful in updating the custom field.
You should've already made your first request to the Inventory Locations API in the previous section of this guide. Within the JSON response to that HTTP request, each inventory location specified its unique InternalName
.
Using 1 or more InternalName
values from your inventory locations, run this command:
curl --request GET "https://api.dev.orderdynamics.net/v1/inventory/onhand?locationInternalNames=[locationOne]" \
--header "Cache-Control: no-cache" \
--header "Ocp-Apim-Subscription-Key: [YOUR_API_KEY]"
Make sure to replace [YOUR_API_KEY]
with your primary or secondary API key and [locationOne]
with the internal name of an inventory location.
This response will return a list of SKUs with their on-hand inventory counts at specific inventory locations. Since locationInternalNames
is an array, you should repeat the query parameter for each additional inventory location you want to include in your request (eg. https://api.dev.orderdynamics.net/v1/inventory/onhand?locationInternalNames=[locationOne]&locationInternalNames=[locationTwo]
). You also have the option to identify the specific item SKUs you want to see the availability of by passing a skus
array to the URL (eg. https://api.dev.orderdynamics.net/v1/inventory/onhand?locationInternalNames=[locationOne]&skus=[firstSku]&skus=[secondSku]&skus=[thirdSku]
).
In addition, you can use this API to update the on-hand inventory for a SKU at a specific inventory location. You'll need the InternalName
from an inventory location and a SKU (which you can get from the Sku
field in the previous JSON response). Your request will then look like this:
curl --request PUT "https://api.dev.orderdynamics.net/v1/inventory/onhand" \
--header "Content-Type: application/json" \
--header "Cache-Control: no-cache" \
--header "Ocp-Apim-Subscription-Key: [YOUR_API_KEY]" \
--data-raw '{
"Sku": "[YOUR_SKU]",
"LocationInternalName": "[YOUR_LOCATION]",
"QuantityType": "Delta",
"Quantity": 10
}'
The HTTP request above will increase the inventory by 10 for [YOUR_SKU]
in [YOUR_LOCATION]
. This requests causes a change in the on-hand inventory by a certain amount (i.e. a delta). If you want to set the on-hand inventory count to a specific number, make sure QuantityType
has the value "Absolute"
instead of "Delta"
.
It's important to note that the data for this request goes in the request body. If this request succeeds, it won't return any data.
For this next request, you'll need the SKU of a pre-order item. With it, you run the following command:
curl --request GET "https://api.dev.orderdynamics.net/v1/preorderinventory/?Sku=EXAMPLE_SKU" \
--header "Cache-Control: no-cache" \
--header "Ocp-Apim-Subscription-Key: [YOUR_API_KEY]"
In the response, you'll get the quantity that customers have already pre-ordered and the quantity planned for this SKU's wave. These quantities will be visible for each inventory location where EXAMPLE_SKU
is available.
In order to get all the calculated available stock by inventory pool group name run the following command:
curl --request GET "https://api.dev.orderdynamics.net/v1/virtualinventory/?inventoryPoolGroupNames=[inventoryPoolGroupOne]" \
--header "Cache-Control: no-cache" \
--header "Ocp-Apim-Subscription-Key: [YOUR_API_KEY]"
This will return the calculated virtual inventory counts for each SKU within [inventoryPoolGroupOne]
, which is an inventory pool group.
The only required query parameter for this request is inventoryPoolGroupNames
. This parameter is an array that contains 1 to 4 inventory pool groups (eg. https://api.dev.orderdynamics.net/v1/virtualinventory/?inventoryPoolGroupNames=[poolGroupOne]&inventoryPoolGroupNames=[poolGroupTwo]
).
You can optionally specify 1 to 7 SKUs, in order to receive data on just those items using the skus
parameter (eg. https://api.dev.orderdynamics.net/v1/virtualinventory/?inventoryPoolGroupNames=[poolGroupOne]&skus=[firstSku]&skus=[secondSku]&skus=[thirdSku]
).
The inventory numbers returned from this endpoint are virtual. This means the "available stock" data that you receive from this endpoint may differ from the data you receive from the Physical Inventory Visibility API.
You'll need an external order ID if you want to know the status of an order. Once you have this ID, run the following command:
curl --request GET "https://api.dev.orderdynamics.net/v1/orders/?ExternalOrderId={EXAMPLE_ORDER_ID}" \
--header "Cache-Control: no-cache" \
--header "Ocp-Apim-Subscription-Key: [YOUR_API_KEY]"
You may include 1 or more ExternalOrderID
values in your request since this query parameter is an array.
The response will include information on {EXAMPLE_ORDER_ID}
such as its order status, and when the order was last updated. There are many different order statuses including NotStarted
, PaymentPending
, and Paid
.
In addition, you can use this API to cancel an existing order. You will need the Internal or External Order ID and a cancel reason if your site has the CANCEL_REASON_TRUE parameter set. Your request will look like this:
curl --request POST "https://api.dev.orderdynamics.net/v1/orders/Cancel" \
--header "Cache-control: no-cache" \
--header "Ocp-Apim-Subscription-Key: [YOUR_API_KEY]"
After making this request you will receive a JSON response, If the cancellation was successful, you will receive a No Content message.
You can also use this API to search orders by query. To do this, you will need to use query logic to locate matching orders. For help with using query logic, see our query building help.
curl --request POST "https://api.dev.orderdynamics.net/v1/orders/Search?pageSize=100&pageNumber=1" \
--header "Content-Type: application/json" \
--header "Cache-Control: no-cache" \
--header "Ocp-Apim-Subscription-Key: [YOUR_API_KEY]" \
--data raw '{
"Field": "[YOUR_FIELD]",
"Operator": "equals",
"Value": "[YOUR_VALUE}",
"GroupId": 0,
"LogicalType": "None"
}'
Make sure to replace [YOUR_API_KEY] with the API key from your profile and [YOUR_FIELD] and [YOUR_VALUE] with the parameters you want your query to be set at.
The HTTP request above will find all the orders that fit the parameters of [YOUR_FIELD] equaling [YOUR_VALUE].
It's important to note that the data for this request goes in the request body and the "GroupId" and "LogicalType" parameters are optional.
The Order Orchestration API can also be used to create new customers for your Store. To do this, you will need to fill out the new customer's information in the request body:
curl--request POST "https://api.qa1.orderdyanmics.net/v1/orders/Customers"
--header "Content-Type: application/json"\
--header "Cache-Control: no-cache"\
--header "Ocp-Apim-Subscription-Key: [YOUR_API_KEY]
--data raw '{
"FirstName": "string",
"LastName": "string",
"Email": "string",
"SubscriberOptIn": true,
"CompanyName": "string",
"PhoneNumber": "string",
"Password": "string",
"CustomerLevel": 0,
"Address":{
"AddressLine1": "string",
"AddressLine2": "string",
"City": "string",
"State": "string",
"ZipCode": "string",
"CountryCode": "string",
"AddressNickName": "string",
},
"Sex": "string",
"BirthYear": "string",
"Language": "string",
"TimeZoneId": "string",
"ExternalCustomerId": "string",
"CustomFields": [{
"Name": "string",
"Value": {}
}]
}'
Replace the "string" fields with the new customer's information and replace [YOUR_API_KEY] with your subscription key. You will receive a JSON response of 201 Created if the request was successful.
The Store Locations API can be used to create, update and view store locations. To create a new store location, you will need to enter the information for the new store in the request body:
curl--request POST "https://api.dev.orderdynamics.net/v1/storelocations/"
--header "Content-Type: application/json"
--header "Cache-Control: no-cache"
--header "Ocp-Apim-Subscription-Key: [YOUR_API_KEY]
--data raw '{
"StoreInteralName": "Toronto South",
"PublicName" : "Bloor East",
"Address" : {
"AddressLine1": "7 Bloor St",
"AddressLine2": "Unit 12",
"AddressLine3": "Block A",
"City": "Toronto"
"State": "ON",
"ZipCode": "M4W 3H1",
"Latitude": 43.67023",
"Longitude": -79.38653,
"CountryCode": "CA",
},
"Email": "user@email.com",
"PhoneNumber": "416-555-1234",
"Active": true,
"Visible": true,
"AllowShipToStore": false,
"CustomFields": [{
"Name": "CustomField",
"Value": "lorem ipsum",
}],
"LinkedInventoryLocationNames": ["Default Location"]
},
It's important to note that the above information is example data, and you should replace each field with your own store's information. The above request will create a store location called "Bloor East" that will be active and visible in your store locator with the "Default Location" set for the inventory location.
You can also view all the existing store locations or a specific one of your choosing. To find a store location of your choosing, you will need the store's internal name. If you want a list of all the existing store locations, leave the store internal name blank. Run the following command:
curl--request POST "https://api.dev.orderdynamics.net/v1/storelocations/?pageSize=100&pageNumber=1"
--header "Cache-Control" no-cache"
--header "Ocp-Apim-Subscription-Key: [YOUR_API_KEY]"
Replace [YOUR_API_KEY] with your subscription key. This request will return the first 100 store locations that currently exist if successful. If you would like to see the next 100 store locations, change the pageNumber parameter to the number 2.
With the Order Fulfillment API, you can create shipments using either the Internal Order Id or the External Order Id. Run the following command:
curl--request POST "https//api.dev.orderdynamics.net/v1/orderfulfillment/shipments/CreateAllShipments
--header "Content-type: application/json"
--header "Cache-Control: no-cache"
--header "Ocp-Apim-Subscription-Key: [YOUR_API_KEY]"
--data raw '{
"InternalOrderId": 0,
"ExternalOrderId": "string",
}'
It's important to note that you must enter the InternalOrderId or the ExternalOrderId. You cannot enter both. You must clear the other field for a successful request. If the request was successful, you will receive a JSON response on 202 Accepted. You can verify if shipments were successfully created by using the GET Order API method and supplying the Internal Order ID or External Order ID.
You can also use this API to cancel shipments if necessary. Before you can cancel a shipment, you must know the Shipment ID. To cancel a shipment, run the following command:
curl--request POST "https://api.dev.orderdynamics.net/v1/orderfulfillment/shipments/Cancel[?ShipmentId]"
--header "Cache-Control: no-cache"
--header "Ocp-Apim-Subscription-Key: [YOUR_API_KEY]"
Replace [YOUR_API-KEY] with your subscription key. If the cancellation request was successful, you will receive a JSON response of 204 No Content.
The Order Fulfillment API can be used to reject, reroute, and split shipments. To reject a shipment, run the following command:
curl--request POST "https://api.dev.orderdynamics.net/v1/orderfulfillment/shipments/Reject"
--header "Content-Type: application/json"
--header "Cache-Control: no-cache"
--header "Ocp-Apim-Subscription-Key: [YOUR_API_KEY]"
--data-raw '{
"ShipmentId": [YOUR_SHIPMENT_ID],
"Reason": "Any reason here"
}'
Replace YOUR_API_KEY and YOUR_SHIPMENT_ID with your API subscription key and the shipment ID of the shipment you want to reject. It's important to note, the shipment ID and reason are changed in the request body. You will receive a JSON response of 200 OK if rejecting the shipment was successful.
To reroute your shipment, run the following command:
curl--request POST "https://api.dev.orderdynamics.net/v1/orderfulfillment/shipments/Reject"
--header "Content-Type: application/json"
--header "Cache-Control: no-cache"
--header "Ocp-Apim-Subscription-Key: [YOUR_API_KEY]"
--data-raw '{
"ShipmentId": 20078,
"RouteType": "ShippingCenter",
"ShippingCenterInternalName": "00SY_InventoryLocation01-SC",
"Reason": "Any reason here"
}'
It's important to note, the information is entered in the request body, and the information shown above is example text. You will need to change it to your own shipment ID and shipping centers. You will receive a JSON response of 200 OK if the rerouting was successful.
You can split shipments with this API using the OrderDetaild or the SKU. The OrderDetailId is the internal (system generated) ID that is created for each item in an order. To get this ID, use the GET Order using ExternalOrderID or InternalOrderID API, input your Order ID and you will be able to see the OrderDetailId. The OrderDetailId will be labelled InternalLineItemId in the returned JSON response.
Run the following command:
curl--request POST "https://api.dev.orderdynamics.net/v1/orderfulfillment/shipments/SplitShipmentByOrderDetailId”
--header "Content-Type: application/json"
--header "Cache-Control: no-cache",
--header "Ocp-Apim-Subscription-Key: [YOUR_API_KEY]"
--data-raw '{
"ShipmentId': 20167,
"LineItemsToSplit": [{
"OrderDetailId":430545,
"Qty": 1
}]
}'
It's important to note that the data shown is example data. Replace the example data with your information in the response body. If the response is successful, you will receive a JSON response of 200 OK.
You can also split shipments using the SKU for the line item. To do this, run the following command:
curl--request POST "https://api.dev.orderdynamics.net/v1/orderfulfillment/shipments/SplitShipmentBySku”
--header "Content-Type: application/json"
--header "Cache-Control: no-cache"
--header "Ocp-Apim-Subscription-Key: [YOUR_API_KEY]"
--data-raw '{
"ShipmentId": 20167,
"LineItemsToSplit": [{
"SKU": "string",
"Qty": 1
}]
}'
In the response body, replace the information shown above with your own information. If splitting the shipment was successful, you will receive a JSON response of 200 OK.
The Payment Processing API can be used to see payment information for orders from your company. To do this, you will need with the Internal Order ID, External Order ID, or Invoice ID. Run the following command:
curl--request GET "https://api.dev.orderdynamics.net/v1/orderfulfillment/shipments/OrderTransactions”
--header: "Cache-Control: no cache"
--header: Ocp-Apim-Subscription-Key: [YOUR_API_KEY]"
If the request was successful, you will receive a JSON response of 200 OK.
Typically, endpoints that return more than one object support pagination. You may provide a pageSize
query parameter in the URL in order to limit the number of entries you'll receive in the response. To iterate through those pages of data, you can specify the pageNumber
query parameter.
With the basics complete, you can learn more by exploring our API reference.
Powered by Azure API Management.