Local Service Inquiry Request

 

Utilize the Local Service Inquiry request to retrieve data for all services associated to a given Order Number, Work Ticket, or on a given date. You can also retrieve data for a specific set of services based on provided Local Services primary keys. This request call also allows you to update MoversSuite data as well.

 

You can query data based on the following:

    All local services associated to a specific Work Ticket.

    All local services associated to a given Order Number.

    All local services that had a specific Order Status (MSS Order Status) change on a given date.

    Specific local service data for one or more Local Services primary keys returned through one of the three previous queries (set the DataOption of OnlyReturnLocalServiceIds to true in one of the previous calls to receive a list of primary keys).

 

The Local Service Inquiry requires a password token associated to a mobile user. Utilize the Mobile Token Request to retrieve and refresh this authorization token.

 

View the Local Service Information API Setup topic for additional setup information.

 

The data returned by this request is documented within the Local Service Information API Content topic.

 

Target

 

Request URI

https://www.moversconnect.net/mobileapi/localservicesinquiry

Content-Type

Valid options:

application/json

application/xml

application/x-www-form-urlencoded

Request Method

POST

Request Timeout

60 seconds

Body

 

Content-Type

application/json or application/xml

Encoding

utf-8

Request Payload - Raw Body

A variety of search criteria is available to retrieve or update job information. The contents are returned as a LocalServicesInquiryCriteria object instance and documented within the Local Service Information API Content topic.

 

All the following criteria and options are available as get or set calls and none are required.

 

Search Criteria

Only one of the following criteria can be specified through this API method.

 

WorkTicketNo

public string WorkTicketNo { get; set; }

Retrieve local service information for a specific Work Ticket. This method returns all services associated to the work ticket.

 

{

   "WorkTicketNo": "5000000001"

}

 

OrderNumber

public string OrderNumber { get; set; }

Search for services for a specific Order Number. The value is matched to what is set within the Orders.OrderNo column. Properly format any needed POS segment information, e.g. U12345-A-B-C.

 

{

   "OrderNumber": "Q07-615-18"

}

 

 

OrderStatusChangeDate

public string OrderStatusChangeDate { get; set; }

Search for services based on a provided date. The application returns all services for all orders that had a specific Order Status change on that date. The Order Status value referenced is what is defined within Local Service Information API Setup. Valid date formats include YYYY-MM-DD or MM/DD/YYYY.

 

{

   "OrderStatusChangeDate": "01/30/2018"  

}

 

LocalServiceIds

public int[] LocalServiceIds { get; set; }

Search for one more services based on provided primary keys, which are returned through one of the other searches (e.g. WorkTicketNo). You can obtain a list of primary keys for qualified services through one of the other searches by specifying the DataOption of OnlyReturnLocalServiceIds to true (example below).

 

{

   "OrderNumber": "Q07-615-18",

   "DataOptions":

   {

      "OnlyReturnLocalServiceIds": true

   }

}

 

Returns:

{

    "ErrorInfo": null,

    "Services": null,

    "ServicesPrimaryKeys": [45959, 45969, 45976]

}

 

The above call returns a list of ServicesPrimaryKeys that you can insert into a LocalServiceIds request (example below).

 

{

   "LocalServiceIds": [45959, 45969, 45976],

   "DataOptions":

   {

     "OnlyReturnLocalServiceIds": false

   }

}

 

MobileUserTimeZoneOffset

public int? MobileUserTimeZoneOffset { get; set; }

Updates the actual start and end time of assigned equipment to reflect UNIX time adjusted for the provided time zone offset; which is ideally the current time zone of the requesting mobile user. The offset value is the number of seconds the mobile user’s time is adjusted, either positive (+) or negative (-), from the UTC time. For example, the US Eastern Standard Time is UTC-05:00, which is minus five hours offset from the UTC time, therefore, what is specified for the mobile user in the Eastern Standard Time is a “-18000” value (-5 * 3600, which is the -5 hour offset in seconds per hour).

This request is only valid when the IncludeAssignedEquipment DataOption is set to true. It updates the StartTimeAct and EndTimeAct values associated to each returned AssignedEquipment record.

In the JSON example below, AssignedEquipment for all returned services will have the actual start and end times updated to reflect Eastern Standard Time.

 

{

   "OrderNumber": "Q07-615-18",

   "MobileUserTimeZoneOffset": -18000,

   "DataOptions":

   {

     "IncludeAssignedEquipment": true

   }

}

 

DataOptions

In addition to the above search criteria, you can filter the queried data by specifying one or more of the following DataOptions (JSON example of these options shows below).

 

{

   "OrderNumber": "Q07-615-18",

   "DataOptions":

   {

      "OnlyReturnLocalServiceIds": false,

      "IncludeAssignedCrew": false,

      "IncludeLaborRequested": true,

      "IncludeEquipmentRequested": false,

      "IncludeMaterials": false,

      "IncludeServiceNotes": true,

      "IncludeDocuments": false,

      "IncludeAssignedEquipment": false

   }

}

 

OnlyReturnLocalServiceIds

public bool OnlyReturnLocalServiceIds { get; set; }

Set to true, this call returns a list of primary keys that can be specified within a LocalServiceIds request (see description under Search Criteria above). If your searches include too much data, which can lead to processing timeout, then utilize this call and a subsequent call using the LocalServiceIds call to narrow down the number of services returned.

 

{

   "WorkTicketNo": "5000000001",

   "DataOptions":

   {

      "OnlyReturnLocalServiceIds": true

   }

}

 

Use within the output within a call similar to the following:

 

{

   "LocalServiceIds": [45959, 45969, 45976],

   "DataOptions":

   {

     "OnlyReturnLocalServiceIds": false

   }

}

 

 

IncludeAssignedCrew

public bool IncludeAssignedCrew { get; set; }

Set to true to retrieve information on the crew assigned to qualified services. View crew assignments through Local Dispatch.

 

InlcudeLaborRequested

public bool IncludeLaborRequested { get; set; }

Set to true to include information on the requested labor associated to qualified services. Labor is requested through the Labor Request function and is visible within the Dispatch Center grid prior to actual crew assignments.

 

IncludeEquipmentRequested

public bool IncludeEquipmentRequested { get; set; }

Set to true to include information on the requested equipment associated to qualified services. Equipment is requested through the Equipment Request function and is visible within the Dispatch Center grid prior to actual equipment assignments.

 

IncludeMaterials

public bool IncludeMaterials { get; set; }

Set to true to include materials associated to qualified services. Manage materials for an order or service through the Update Containers, Packing and Unpacking screen.

 

IncludeServiceNotes

public bool IncludeServiceNotes { get; set; }

Set to true to include any Note associated to the order.

 

IncludeDocuments

public bool IncludeDocuments { get; set; }

Set to true to include any documents associated to the specified order. These documents are managed through for Document Management order.

 

IncludeAssignedEquipment

public bool IncludeAssignedEquipment { get; set; }

Set to true to retrieve information on the equipment assigned to qualified services. View crew assignments through Local Dispatch.

You can also update the starting and ending times associated to AssignedEquipment when this is option is set to true and the MobileUserTimeZoneOffset is specified or provided for the mobile user’s current time zone. Refer to the MobileUserTimeZoneOffset description above for more information.

 

Custom Headers

Request Parameters

Create a parameter for Authorization with value of “Bearer” followed by a space and then the password token returned by the Mobile Token Request. In the illustration below, the Authorization is for a token value that begins with “tpirdLrXa8GHuCTlSjhmsbCg…”

 

Using the password token allows the request to process without having to enter credentials for each request. If the password token expires, it can be refreshed with a subsequent Mobile Token Request call with a grant_type of Token.

Response

 

Request Body

The Request Url and Request Method set within the Target parameters display for confirmation within this section. A Status Code is also available to assist in determining the status of the request. You may encounter the following codes:

200: Successful call

403: Invalid or missing parameters or expired Authorization header/bearer token

500: Invalid parameter, improper Request URI, no API service running or defined

 

Response Body

RAW Body

The content of the LocalServicesInquiry object returns upon a successful call. Sample data displays below. Reference the Local Service Information API Content topic for a complete list of possible values returned by this request.

 

{

    "ErrorInfo": null,

    "Services": [{

        "Commodity": "HHG",

        "MoveType": "COD Local",

        "OrderServiceType": null,

        "LocalServiceId": 45959,

        "WorkTicketNo": "5000000001",

        "Status": "Crew Assigned",

        "ServiceType": "Local Move",

        "ServiceDate": 1517169600,

        "JobStart": "07:15 AM",

        "JobEnd": "03:45 PM",

        "OrderNo": "Q07-615-18",

        "ShipperName": "Bruce Wayne",

        "ShipperEmail": "Bruce@Shipper.fake",

        "ShipperPhone1": {

            "Id": 12226505,

            "Type": "OHome",

            "Area": "608",