Use this request to assign an Agent to a known Market record. This request requires a primary key for the Agent record and the External Code for the Market. A successful request updates the AgentMarket table which stores the mappings between the Agent and Market tables, managed through Agent Setup.
This method requires information that you can obtain from Get Agent By ID or PriKey Request and Get Markets Request.
Request Format
https://://{server}/api/agents/{priKey}/markets/{externalCode}
HTTPS:// Verb/Method:
POST
Request Parameters
Provide the primary key of the agent and External Code of the market to link the two tables. You can obtain from Get Agent By ID or PriKey Request and Get Markets Request.
Parameter |
Description |
{server} |
Provide the name of the server running the MoversSuite API Service. |
{priKey} |
Provide the primary key for the Agent record you wish to add the market mapping. The primary key is accessible through the Get Agent By ID or PriKey Request. |
{externalCode} |
Provide the External Code of the Agent Market you wish to have added to the Agent record. This field corresponds to the External Code managed through Agent Market Setup and can be obtained through the Get Markets Request. |
REQUEST EXAMPLE:
https://://server/api/agents/306/markets/AM1
Request Return
Upon a successful call, the request returns a value of one (1).
Upon an error, the request returns zero (0) and writes an exception message to the MssApiService log.