Add Agent

 

Add an agent record to the MoversSuite database.

 

HTTP Verb/Method:

POST 

URL format:

http://server/api/agents

Returns:

Returns the unique record identifier (PriKey) when successful. The identifier corresponds to the Agent.PriKey in the MoversSuite database.

Returns zero (0) upon failure.

 

Parameters

 

None.

 

Input Properties

 

This section lists the data needed to add 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",

        "Address2": null,

        "Address3": null,

        "City": "Portland",

        "Country": "United States of America",

        "PostalCode": "97008-4986",

        "State": "OR"

    },

    "AgentID": "U1234",

    "Contact": "Thomas Barry",

    "County": "Multnomah",

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

           }],

    "System": "UniGroup Queues",

    "VanlineCode": "U",

    "VendorID": "EWS Moving"

}

 

OUTPUT EXAMPLE:

 

3077

 

 

The following table describes the data returned by this method. All properties are considered “null” unless otherwise specified.

 

Note

Properties denoted as “REQUIRED” must be set.

 

 

Property

Description

Active

Set the Inactive flag as set through Agent Setup.

Address

Set the address for the Agent Setup.

Data set through this property include:

Address1

Address2

Address3

City

Country

PostalCode

State

 

AgentID

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

 

Note: The combination of AgentID and VanLineCode must not exist within MoversSuite. See Agent API Setup for more information.

 

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 visible hrough Agent Setup.

PhoneNumbers

Up to two phone number records can be entered 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 (refer to Agent Setup and Phone Number Entry for field descriptions):

AreaCode

CountryCode

Extension

LocalNumber

PhoneType (set to “Phone”)

 

Data appearing for a PhoneNumbers entry with a PhoneType of “Fax” includes (refer to Agent Setup and Phone Number Entry for field descriptions):

AreaCode

CountryCode

LocalNumber

PhoneType (set to “Fax”)

 

System

REQUIRED - The System links this record to a XML System Setup record. The value entered here must match the External System defined within XML System Setup.

See Agent API Setup for more information.

VanLineCode

REQUIRED - Associate this record to a particular van line. The code entered here is defined in Van Line Setup for a Van Line that links to this agent record through Agent Setup. This value must also match the External Code for the System property within XML Interface Setup.

 

Note: The combination of AgentID and VanLineCode must not exist within MoversSuite.

 

See Agent API Setup for more information.

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.

 

Note: This property must match an entry within the VENDORID on the PM00200 database table.