Update Agent

 

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

 

HTTP Verb/Method:

PUT 

URL format:

http://server/api/agents

Returns:

Returns one (1) upon success.

Returns zero (0) upon failure.

 

Parameters

 

None.

 

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:

 

http://server/api/agents

 

INPUT EXAMPLE:

 

{

    "Active": true,

    "Address": {

        "Address1": "123 Coffee Road",

        "City": "Portland",

        "Country": "United States of America",

        "PostalCode": "97008-4986",

        "State": "OR"

    },

    "AgentID": "U1234",

    "Contact": "Thomas Barry",

    "County": "Multnomah",

    "ID": 3077,

 "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.

AgentID

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

Contact

Provide the name of the contact person for the agent record. This corresponds to the Contact set within Agent Setup.

County

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

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.

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.