Place Order

From WMS Wiki
Jump to: navigation, search

Contents

URL

http://<wms-url>/api/order.new

Description

Allows placing a new order in the system.

Request

  • authenticationToken [varchar]
  • customerId [int]: the customer that will receive the order.
  • carrierId [int]: the carrier that will be used for the shipment.
  • miamiShipDate [date]: the order ship date. Format must be mm/dd/yyyy.
  • printWmsLabels [int] [optional]: Optional parameter that can be used to order the WMS to generate boxes labels and send immediately to print to a remote printer that should be configured in WMS. If printing is unsuccessful it does not affect the order. [0 = Don't print, 1 = Print]
  • orderNumber [varchar][optional]: the order number or invoice number
  • lotNumber [varchar][optional]: the lot number
  • lotQty [int][optional]: Quantity of boxes you want to get from the inventory and the specified lot number
  • poNumber [varchar][optional]: the purchase order number
  • generateBOL [boolean][optional]: true or false. If it's true, the system will assign a number of BOL to the boxes once they are properly assigned.
  • instructions [varchar][optional]: a special instructions or comments on the order
  • boxIds [varchar]: an array of the boxes that will be assigned to the order, separated by comma. You must use the 'boxCode' field that was returned in the ' box.availability.list' method.
  • boxIds: Array of boxIds, where the letter i is the array index that begins in 0. You should use this array if you want to specify the price by stem for a set of boxes.
    • boxIds[ i ] [varchar]: an array of the boxes that will be assigned to the order, separated by comma. You must use the 'boxCode' field that was returned in the ' box.availability.list' method.
    • stemPrice[ i ] [number]: price by stem.
    • markCode[ i ] [string]: mark code.

Note: Please make sure that you only use one of the boxIds attribute. Only one of them is accepted, the string or the array.

Response

  • status [int]: returns 1 when successful and 0 when unsuccessful.
  • error [varchar]: returns the description of the error.
  • boxesNotAvailable [array]: returns a list of boxes that could not be added to the order since they already have shipping information. The array returns the box code, customer name, carrier name and ship date.
    • boxCode [varchar]
    • customer [varchar]
    • carrier [varchar]
    • shipDate [date]

The method can return a status of 1 while at the same time return a list of boxes that were unable to be added to the order. This can happen when some boxes were assigned and some were not.

Example

Request

Box Ids as String

     http://<wms-url>/api/order.new?authenticationToken=YOUR_TOKEN&customerId=18774
      &carrierId=32&miamiShipDate=12/28/2011&boxIds=1448154,1442183

Box Ids as Array

     http://<wms-url>/api/order.new?authenticationToken=bhn6gell6t95n0jna4htirphcb&customerId=1436&carrierId=116&miamiShipDate=06/25/2014
      &boxIds[0]=1200362,1200363&stemPrice[0]=0.589&boxIds[1]=1200371,1200370,1200369&stemPrice[1]=0.589

Response

Successful

If all boxes were successfully processed you will receive the following response:

     {"error":"Boxes successfully processed: 10 -","status":1}

or

If some boxes were successfully processed but some were not found you will receive the following response:

     {"error":"Boxes successfully processed: 9 - Boxes not found: 1 (1448154) - ","status":1}

or

If some boxes were processed, some were not found and some had been previously assigned to other orders you will receive the following response:

  1. {
  2.     "boxesNotAvailable": [
  3.         {
  4.             "carrier": "Armellini",
  5.             "boxCode": "1448154",
  6.             "shipDate": "12/28/2011",
  7.             "customer": "SIECK PORTSMOUTH"
  8.         }
  9.     ],
  10.     "error": "Boxes successfully processed: 9 - Boxes not available: 1 (1448154) - ",
  11.     "status": 1
  12. }
Unsuccessful
     {"error":"Invalid Credentials","status":0}

or

     {"error":"Boxes not found: 1 (1448154,1442183) - ","status":0}


Available Methods

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox