How to create Orders with the Infoplus API

How to create Orders with the Infoplus API

One of the most common use cases of the Infoplus API is to create Orders in Infoplus.  This can be useful, for example:

  • If you have an in-house system with Orders that need to be managed and/or fulfilled by Infoplus.
  • If you are pulling Orders from an order source with which Infoplus is not directly integrated.

The purpose of this article is to explain the basic set of required fields for placing an Order with the Infoplus API, to give you a starting point that you can build upon.  

 

From a mechanical standpoint, creating an Order is as simple as a single HTTP POST to the order endpoint in the Infoplus API. For example, using version beta of the api, on the command line:   

The interesting part is all about the data that is included in that POST.  


The simplest example Order that can be placed through the Infoplus API looks like the following: 

 

Going through that JSON object field-by-field, we have:

Field Description Notes
lobId Integer; Id of the Line of Business (LOB) that the Order belongs to.  You can find your LOB Id by using the lineOfBusiness/search endpoint in the Infoplus API, as in:
curl -H API-Key:YOUR-API-KEY \
https://YOUR-INFOPLUS-DOMAIN/infoplus-wms/api/beta/lineOfBusiness/search
warehouseId Integer; Id of the Warehouse that the Order will be fulfilled from. You can find your Warehouse Id in the Warehouse Table, within Infoplus.
Or, you can use the warehouse/search endpoint in the Infoplus API, as in:
curl -H API-Key:YOUR-API-KEY \
https://YOUR-INFOPLUS-DOMAIN/infoplus-wms/api/beta/warehouse/search
 
customerNo String; Unique identifier (within the LOB) for the Customer that the Order will be associated with.
See How to use Customers, Bill To Address, and Ship To Address with Orders in the Infoplus API for more information.
orderDate Date (YYYY-MM-DD); Date that the order was placed in the source system. Note:  Infoplus may adjust this date based on the Order's scheduled fulfillment date.  
carrierId Integer; Related to the Carrier Ids within Infoplus, like UPS/USPS/Fedex You can find your Carrier Id in the Carrier Table, within Infoplus.
Or, you can use the carrier/search endpoint in the Infoplus API, as in:
curl -H API-Key:YOUR-API-KEY \
https://YOUR-INFOPLUS-DOMAIN/infoplus-wms/api/beta/carrier/search
lineItems List of Line Items on the Order.   
lineItems[i].sku String;  Unique identifier (within the LOB) for the Item being ordered. All SKU's on an order must be unique (i.e., you can not have 2 or more line items for the same SKU).
lineItems[i].orderedQty Integer; Unit quantity being ordered.   


Beyond these required fields, there are many more optional fields that can be included when you create (or update) an Order. You can consult the
API Reference site for a listing of all fields.  

Frequently Asked Questions

Question: I have been looking at the API Reference Site  and see a lot of fields, how do I know which ones I need for an Order?

  • Option 1: You can look in one of two places, the first being the Body Schema in the API Reference Site and see the words (required) next to required fields, like below.
  • Option 2: You can also go to the Infoplus WMS page, like Create New Order, and see fields with a red asterisk that indicate required fields, which also correlate to the required fields in an API call.

    Note: Ship To will be filled out by the information related to the Customer record, if the customer has already been created. If not, please read How to use Customers, Bill To Address, and Ship To Address with Orders in the Infoplus API for more information.
Question: I am using a Third Party API solution and I need my API to query Infoplus for the Tracking Number, how can I accomplish this task?
  • If you can know the Order Id, you can use the Get Order By Id API call to pull the Tracking Number using the field, trackingNo. Additionally, if you want to automate it to pull the Tracking Number into another system or send a shipping confirmation, you can set up a Webhook through our Script feature. 
Question: I want to cancel orders via the API. How do I do that? 
  • At this time, Infoplus does not have the functionality to cancel orders via the API. We require that a human being perform the cancelation in order to keep mistakes to the bare minimum. What many of our customers do is add a tag "Cancel Order" via the API to the order, then set up a smart filter to find the orders with those tags. From there they use a trigger to email a manager every time an order appears. From there the manager can manually cancel the order.
  • Editing of orders via the API is not supported if the Order is in a processed state. Editing orders in Process/Shipped state must be done manually via the Edit Processed/Shipped orders process.
  • A user can delete an order via the API, but only if the order is not yet processed or shipped.