Update Agent Request

 

This request allows a process to update an agent record (Agent Setup) in the MoversSuite database.

 

Request Format

 

https://://{server}/api/agents

 

 

HTTPS:// Verb/Method:

 

PUT

 

 

Request Parameters

 

The following table describes the parameters available for the Update Agent Request.

 

Parameter

Description

{server}

Provide the name of the server running the MoversSuite API Service.

 

 

Request Return

 

Upon a successful call, the request returns one (1).

 

Upon an error, the request returns zero (0) and writes an exception to the MssApiService Logging.

 

 

Input Properties

 

This section lists the data needed to update an agent record to MoversSuite using this method. The data must be set in the JSON format. The following example illustrates such a request.

 

REQUEST EXAMPLE:

 

https://://server/api/agents

 

INPUT EXAMPLE:

 

{

    "Active": true,

    "Address": {

        "Address1": "123 Coffee Road",

        "City": "Portland",

        "Country": "United States of America",

        "PostalCode": "97008-4986",

        "State": "OR"

    },

    "Contacts": [{

        "Contact": "Thomas Barry",

        "Email": "tbarry@spamfree.com,

        "PrimaryContact": true,

        "Title": "Roaster",

              "PhoneNumbers": {

                     "AreaCode": "808",

                     "CountryCode": "1",

                     "Extension": null,

                     "LocalNumber": "315-5224",

                     "PhoneType": "Main"

              }

       },

       {

        "Contact": "Alex Arabica",

        "Email": "aarabica@spamfree.com,

        "PrimaryContact": false,

        "Title": "Grinder",

              "PhoneNumbers": {

                     "AreaCode": "808",

                     "CountryCode": "1",

                     "Extension": null,

                     "LocalNumber": "315-5223",

                     "PhoneType": "Main"

              }

       }],

    "AgentID": "U1234",

    "County": "Multnomah",

    "ID": 3077,

    "HaulOwnAuthority": true

    "HaulVanLineAuthority": false,

 "Memo": "Fax 503-893-0500 ",

    "Name": "EWS Moving Systems",

    "PhoneNumbers": [{

        "AreaCode": "800",

        "CountryCode": "1",

        "Extension": null,

        "LocalNumber": "828-7144",

        "PhoneType": "Phone"

    },

        "AreaCode": "503",

        "CountryCode": "1",

        "LocalNumber": "828-4945",

        "PhoneType": "Fax"

           }],

    "VendorID": "EWS Moving"

}

 

OUTPUT EXAMPLE:

 

1 (success) or 0 (failure)

 

 

The following table describes the data needed for this method. Only set properties are updated by this method; only the Name property is required to be present.

 

NOTES

Properties denoted as “REQUIRED” must be set.

To delete a property, pass in the property with no fields set. For example, to clear out the address, enter something similar to the following:

 

   ...

   "Address": {

        "Address1": null,

        "Address2": null,

        "Address3": null,

        "City": null

        "Country": null,

        "PostalCode": null,

        "State": null

    },...

 

 

 

Property

Description

Active

Set the Inactive flag as defined through Agent Setup.

Address

Set the address for the Agent Setup.

Data set through this entry include:

Address1

Address2

Address3

City

Country

PostalCode

State

 

Provide null data for all address properties to clear out an address.

Contacts

Establish contact record for the agent record. This information is accessible through Add Agent Contact.

AgentID

Specify the unique identifier for the agent record. This setting corresponds to the Agent ID within Agent Setup.

County

Provide the county of the agent record. This corresponds to the County set within Agent Setup.

HaulOwnAuthority

Set to “true” if the Haul Own Authority flag is set for the record within Agent Setup, set to “false” otherwise.

HaulVanLineAuthority

Set to “true” if the Haul Van Line Authority flag is set for the record within Agent Setup, set to “false” otherwise.

Memo

Provide a Memo value for the record through Agent Setup.

Name

REQUIRED - This is the full, descriptive name of the agent set through Agent Setup.

PhoneNumbers

Up to two phone number records can be updated for the Agent Setup record: (1) Primary phone for the account as defined with a PhoneType entry of “Phone”; and (2) A fax number for the agent contact defined with a PhoneType entry of “Fax.”

Data set for a PhoneNumbers entry for a PhoneType of “Phone” include the following:

AreaCode

CountryCode

Extension

LocalNumber

PhoneType

 

Data appearing for a PhoneNumbers entry with a PhoneType of “Fax” includes:

AreaCode

CountryCode

LocalNumber

PhoneType

 

Provide null data for all phone number properties to clear out a phone number entry.

NOTE: You cannot update a Market assignment using this request. Please use the Add Agent Market Request and/or Delete Agent Market Request.

System

DO NOT UPDATE THIS PROPERTY

VanLineCode

DO NOT UPDATE THIS PROPERTY

VendorID

This setting links the agent to a vendor record in Microsoft Dynamics GP. Enter the appropriate identifier for this agent’s record as defined in Dynamics GP.