Find Order Request

 

This request returns an Orders.PriKey for a specified Order Number or equivalent components (Order Segment, Partial Segment, Overflow Segment, and Set-Off Segment) along with a specified van line affiliation code. Only non-archived orders are included in the search by this request.

 

Request Format

 

http://{server}/api/orders/find?ordernumber={ordernumber}&vanline={vanline}&datatypemapname={datatypemapname}&pseg={pseg}&oseg={oseg}&sseg={sseg}

 

 

Request Parameters

 

The following table describes the parameters available for the Find Order Request.

 

Parameters

Description

{server}

Provide the name of the server running the API Service. 

{ordernumber}

Provide the full MoversSuite Order Number or enter an Order Segment to base the search on. If specifying an Order Segment, then specify {pseg}, {oseg}, and {sseg} as needed to identify the order.

 

Technical Reference                 

The database fields referenced by this argument include the following:

Orders.OrderNo

Orders.PriKey

Orders.OrderSeg

 

{vanline}

Provide a Van Line Code or an External Code.

If a Van Line Code is specified, the API Service matches on the van line affiliation set for the order. Manage Van Line Codes through the Van Line Setup.

If providing an External Code, then you must specify {datatypemapname}, which must match a Name value defined within the XML System Data Type Map section within XML System Setup (which also identifies the corresponding XML Interface Setup record and van line affiliation).

 

Technical Reference

The database fields referenced by this argument include the following:

Orders.VanLineFID

VanLine.VanLineCode

XmlExternalInterfaceVanlineMap.ExternalCode

 

If this argument is not specified, the API Service searches only for the specified order that has no van line affiliation.

{datatypemapname}

Provide the name of the record type to process.

This argument works in conjunction with an External Code specified through the {vanline} argument. If specified, the External Code must match a Name value defined within the XML System Data Type Map section within XML System Setup (which also identifies the corresponding XML Interface Setup record and van line affiliation).

 

Technical Reference

The database fields referenced by this argument include the following:

XmlInterface.XmlInterfaceID

XmlSystem.XmlInterfaceFID

XmlSystemDataTypeMap.Name

 

{pseg}

If specifying an Order Segment through the {ordernumber} argument, then specify additional segments through these arguments as needed to identify the order. If the record you are searching for contains null data, then specify the characters “%00”.

 

Technical Reference

The database fields referenced by this argument include the following:

Orders.PSeg

Orders.OSeg

Orders.SSeg

 

{oseg}

{sseg}

 

Request Return

 

Upon a successful call, the request returns the Orders.PriKey (primary identify for the MoversSuite Orders table).

 

Upon an error, the request returns an error code along with an error description. In the example below, the API Service was unable to locate an order based on the partial information provided.

 

{"ErrorCode":65537,"Issue":"Order 72-1-2?vanline=U not found."}

 

Example

 

Request to retrieve primary key by order components for order with an segment of “72-1-2”, vanline of “U”, data mapping for “UniGroup Order Information – Registration” and null values for the POS segments:

 

http://appserv:9999/api/orders/find?ordernumber=72-1-2&vanline=U&datatypemapname=UniGroup%20Order%20Information%20-%20Registration&pseg=%00&oseg=%00&sseg=%00

 

Returns: 1902 (primary key)